Sign in to follow this  
Storyyeller

Box2d for platformers?

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
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

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

Sign in to follow this