Skip to main content

Game State Management

  • Chapter
  • First Online:
  • 2161 Accesses

Abstract

Normally, you don’t immediately start playing when a game application starts. For example, in the Jewel Jam game, you see a title screen before playing. More complicated games have menus 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 Jewel Jam, 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 screens to the game, it’s going to be a pain to manage which objects belong to which screen and when they should be drawn or updated.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   69.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   89.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Arjan Egges

About this chapter

Cite this chapter

Egges, A. (2014). Game State Management. In: Building JavaScript Games. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-6539-9_20

Download citation

Publish with us

Policies and ethics