O'Reilly logo

iOS 9 Game Development Essentials by Chuck Gaffney

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

State machines

A video game, more than any other type of application, bases much of its logic on whether the game or entities in that game are currently in one of a number of different states.

This could be checking whether the game is in the intro scene, running in the main gameplay mode, the player has died, the player is idle, a boss enemy has appeared, the game is over, the stage is over, the boss is low on health, and much more.

State machines

An example of state machines for either AI or character animations

In the past, it has always been common practice for game developers to write their own custom state machine logic from scratch and then use the update/render ...

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