13. The Chipmunk Physics Engine (No Alvin Required)

Now that you have experienced using Box2D to make a cart-racing-and-jumping level, you can see how using a game physics library allows you to add some amazing effects to your game.

One of the nice things about Cocos2D is that it comes with not one but two different 2D game physics libraries. You’ve tried Box2D already in Chapters 10, 11, and 12, so now it’s time to try the other library: Chipmunk.

In this chapter, you use Chipmunk to create a Metroid-style platform jumping level (Figure 13.1), where Ole has to leap from platform to platform to escape the planet before it explodes. In the process, you learn how to use Chipmunk, how it differs from Box2D, and you’ll be ready to use whichever library ...

Get Learning Cocos2D: A Hands-On Guide to Building iOS Games with Cocos2D, Box2D, and Chipmunk now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.