12. Advanced Game Physics: Even Better than the Real Thing

In Chapter 11, “Intermediate Game Physics,” you made an action-packed level where you can race a mining cart across interesting terrain and tap to leap through the air. However, there are two major problems. First, the level is far too easy! There are no dangers to avoid, no enemies to fight. Second, our hero Ole is nowhere to be seen! It’s time to wake him up from his mad dreams and bring him back into action.

In this level, you pick up where you left off in Chapter 11 and add Ole into the mine cart (Figure 12.1) using Box2D so his body reacts to the bumps and jumps using a cool ragdoll effect. You also add bridges to cross, spikes to avoid, and even a boss fight at the end with a cinematic ...

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.