Book Image

Learning iPhone Game Development with Cocos2D 3.0

By : Kirill Muzykov
Book Image

Learning iPhone Game Development with Cocos2D 3.0

By: Kirill Muzykov

Overview of this book

Table of Contents (19 chapters)
Learning iPhone Game Development with Cocos2D 3.0
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Creating a physics world


In this part of the chapter, we're going to create a new level where the hunter will regret that he made the birds angry for shooting some arrows at them. In this level, the birds will drop stones and the hunter will need to dodge them.

We will use a Cocos2D-integrated physics engine called Chipmunk to simulate the physics, handle collisions, and so on. However, first things first. To create physics objects and simulate physics, we need to create a physics world, or a physics node as it is called in Cocos2D.

The previous versions of Cocos2D supported two physics engines: Box2D and Chipmunk. In the third version (v3), the choice was made in favor of Chipmunk. This allowed making a tighter integration, and now it is much easier to start using physics in your Cocos2D game. However, the main concepts covered in this chapter are similar to all physics engines, so don't worry, you can decide later which physics engine to use in your games.

Note

You can find out more about...