Introduction to steering behaviors
AI characters are a type of autonomous agent that is intended to be used in computer games for showing virtual reality. These agents represent a character in a story or game and have some ability to follow some pre-set actions. Actions of these characters are directed in real time by a human player or participant. In games, autonomous characters are sometimes called non-player or artificially intelligent characters. An AI character always has some aspects of an autonomous robot with some predefined skills such as either they will be seeking some characters in the game or they will evade themselves from the playing character. All these behaviors are called steering behaviors.
Getting ready
In this chapter, we will create a new game to demonstrate all the steering behaviors. To get started with the implementation, let us create a new project. Open Xcode and go to File | New | Project, and then select iOS | Application | SpriteKit Game. In the pop up provide...