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.