Chapter 4: Physics
For years, physics engines have been used in video games to add a sense of realism to the action onscreen. In many games, physics plays a crucial role within the gameplay. Cocos2d comes bundled with two popular 2D physics engines: Box2D and Chipmunk.
In this chapter, we will explain the most common uses of physics in games using Box2D as our engine of choice. Most of the recipes here can be easily modified to use Chipmunk or any other similar physics engine.