Book Image

iOS Game Programming Cookbook

Book Image

iOS Game Programming Cookbook

Overview of this book

Table of Contents (19 chapters)
iOS Game Programming Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

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