Frog continued...

posted in Once a Bird
Published June 30, 2008
Advertisement
After finishing the frog sprites, I used the Farseer Physics Engine to include the frog in the game.
In order to make the frog feel real each body part was added as a separate entity and revolute joints were employed to connect the body parts to each other in the positions shown below:



A revolute joint connects two bodies but doesn't constrain their relative angles, which means that after adding them the frog's legs and tongue rotated like the frog had every bone in his body broken. However Farseer also provides angle limit joints, that constrain the angle between two entities. These limits can be changed after the simulation has started.

Click here for a movie showing the leaping frog. Initially the upper and lower limits of the angle joints are set to zero, so the frog is completely rigid. Each time I press a key these limits are set to something close of a real frog and an upwards force is applied to the frog body, thus making it look like a leap. Another key sets the joint limits to the initial values. It's all Farseer's work, really.

Next step is controlling the frog's leap so he'll jump from platform to platform.
Previous Entry Frog
Next Entry Bennu on the 360...
0 likes 4 comments

Comments

DecipherOne
Sounds cool, the movie doesn't seem to work though. File seems to download, but playback ends immediately.
July 01, 2008 09:09 PM
Demosthenes
Weird, it works for me. It may be some codec missing. Are you opening it with Windows Media Player?
July 02, 2008 03:19 AM
benryves
Looking great, and the video works fine here. [smile]
July 02, 2008 06:15 AM
Demosthenes
Quote:Looking great, and the video works fine here.


Ah, thanks. :)
July 02, 2008 08:13 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement