Book Image

Cocos2d-x Cookbook

By : Akihiro Matsuura
Book Image

Cocos2d-x Cookbook

By: Akihiro Matsuura

Overview of this book

Table of Contents (18 chapters)
Cocos2d-x Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Introduction


Physics is really important for games. Players need to simulate real-world situations. You can add physical realism to your game by using a physics engine. As you know, there are two famous physics engines: Box2D and Chipmunk. In Cocos2d-x version 2.x, you have to use these physics engines. However, it is pretty difficult to use them. Since Cocos2d-x version 3.x, Cocos2d-x has a useful physics engine wrapped in Chipmunk. Therefore, the physics engine is no longer a concern for us as it is scalable and CPU friendly. In this chapter, you will learn how to use the physics engine easily in your game.