O'Reilly logo

Learning Cocos2D: A Hands-On Guide to Building iOS Games with Cocos2D, Box2D, and Chipmunk by Ray Wenderlich, Rod Strougo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required