Chapter 18
Game State Management
Normally, you don’t immediately start playing when a game application starts. For example, in the Tut’s Tomb game, you see a title screen before playing. More complicated games may have a title screen, a menu for options, menus for selecting different levels, screens to display the high score after finishing a level, a menu to select different characters and attributes, and so on. In Tut’s Tomb, adding a title screen wasn’t that difficult because the title screen itself had very little interaction. However, when you look at the example in the previous chapter, you can see that building a screen with a few options and controls can result in quite a lot of code. You can imagine that when you add more menus and ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access