Jump to content
  • Advertisement
Sign in to follow this  
Storyyeller

Box2d for platformers?

This topic is 3102 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am currently making a 2d platformer in C++. Back when I started, I tried using Box2d for the physics, but had trouble figuring it out and decided to make all my own collision detection code. I now have several levels done, but I am planning on trying to redesign the engine, and figured that while I was at it, I might as well have another go at trying Box2d. I saw several comments saying that version 2.1 of Box2d is much better then 2.01. Is this something to worry about? Where can I get 2.1? Also, how do you learn to take advantage of the Box2d API? I know how I want the physics in my game to behave (after all, I implemented it), but I have no idea how to express that in joints and constraints and collision groups. Are there any tutorials that deal with common issues when making a platformer with Box2d? (infinite friction on horizontal surfaces, 0 friction on vertical surfaces, infinite inertia and rotational inertia, semi solid platforms, etc.)

Share this post


Link to post
Share on other sites
Advertisement
Yes the changes are big:
http://www.box2d.org/forum/viewtopic.php?f=2&t=3201

I've put off investing time on the physics side of things in my game until 2.1 is released and ported to Python.

You can get the latest source from:
http://code.google.com/p/box2d/source/checkout

Have a look at the Box2D forums, you should be able to find the answers for most of your questions already posted, a lot of people have already asked various questions about using box2d in a platform game:
http://www.box2d.org/forum/

Checkout the Box2d wiki and download the testbeds, they really help when learning the API:
http://www.box2d.org/wiki/index.php?title=Main_Page

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!