Chapter 6. Physics Behavior
One of the features that makes the difference and converts games into successful products of entertainment is simulating reality accurately. It helps players feel like part of the game by being immersed in the world represented and augmenting their involvement.
Building a realistic game has been key to video game development since its origins, and as the technology evolved, it has been easier to simulate behaviors such as gravitational forces or collisions thanks to the rise of physics engines.
This chapter introduces you to Chipmunk, the physics engine included in Cocos2d, and shows you how to create the game's space thanks to the CCPhysicsNode
class and configure its properties.
Also, this chapter will teach you how to define a physics world, create bodies and shapes and configure their properties, and give physical behavior to sprites. With this knowledge, you will develop a snooker game (a kind of pool game) where you can implement all you have...