CHAPTER 10

image

The State Machine and Scenes

A typical game will include multiple states during its existence. A state can be one of many different scenes in a game, including a home screen, a leaderboard, a settings menu, the game itself, and many others. A game can consist of a few or many states, and the management system to assure that only one state is running at a time is an important technique in game development. The collective components that make up this management system are referred to as a state machine.

This chapter will take a close look at each area that makes up a state machine, and then you’ll put your new knowledge into practice ...

Get Beginning HTML5 Games with CreateJS now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.