Game Development Reference
In-Depth Information
Meeting Box2D
At the core of the engine, you have the b2World object. This is the simulation. You fill
the world with b2Body objects, and then you step through the simulation with b2World-
>Step() . And you take the results of the simulation and display them to the user through
your sprites, by grabbing a b2Body object's position and rotation and applying them to a
sprite.
The debug draw object allows you to see the simulation without using any sprites. Sort of
like a version of our test project from Chapter 6 , Quick and Easy Sprite - Victorian Rush
Hour .
Search WWH ::




Custom Search