O'Reilly logo

Learn cocos2d 2: Game Development for iOS by Andreas Löw, Steffen Itterheim

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

Chapter    12

Physics Engines

Physics engines are what drive popular iOS games like Angry Birds, Stick Golf, Jelly Car, and Stair Dismount. They allow you to create a world that feels dynamic and lifelike.

Cocos2d is distributed with two physics engines: Box2D and Chipmunk. Both are designed to work only in two dimensions, so they’re a perfect fit for cocos2d.

In this chapter, you’ll learn the basics of both of these physics engines, and along the way you’ll probably come to appreciate one more than the other. I’ll briefly explain the differences between them, but for the most part it’s a choice based on personal preference.

If you’ve never worked with a physics engine before, don’t worry—I’ll also give you a quick introduction to their basic ...

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