O'Reilly logo

Python Game Programming By Example by Joseph Howse, Alejandro Rodas de Paz

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 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, ...

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