Jump to content
  • Advertisement
  • entries
    112
  • comments
    236
  • views
    136635

Frog continued...

Sign in to follow this  
Demosthenes

269 views

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.
Sign in to follow this  


4 Comments


Recommended Comments

Sounds cool, the movie doesn't seem to work though. File seems to download, but playback ends immediately.

Share this comment


Link to comment
Weird, it works for me. It may be some codec missing. Are you opening it with Windows Media Player?

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!