Chapter 4. Steering Behaviors

Our previous cocos2d game was based on actions, so movements and rotations were predefined and the characters were not influenced by the current state of the game. However, a recurring problem in game development is how to recreate life-like animations, such as pursuing a target or avoiding moving obstacles.

Now, you will learn how to apply steering behaviors, a technique used to create seemingly intelligent movements for autonomous characters. The implementation of these strategies achieves the ability to navigate through the game world with improvised patterns.

Finally, we will put these strategies in practice with particle systems, a Cocos2d module that we have not worked with so far. Since we will use simple shapes, ...

Get Python Game Programming By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.