Game Development Reference
In-Depth Information
Chapter
7
Main Scene and Game State
So far we've fully neglected the main scene, where the game's main menu ought to be. The
main menu is a good place to add a Settings menu that allows you to change the volume of
background music and sound effects.
The settings popover requires a grid-based layout, which is why you'll use the Box Layout
node for the first time. You'll also add a way to store the game state permanently—for in-
stance, unlocked levels and audio volumes—so that it doesn't get lost if the app is termin-
ated.
Main Scene Background
It's time to give the game's main menu a make-over. Right now MainScene.ccb is still the
pale, blue scene with the SpriteBuilder label and a play button.
Designing the Background Images
In the previous chapter, you already added the Menu and UserInterface Sprite Sheets.
Switch to the Tileless Editor View and, at the bottom, check the Menu folder so that it isn't
filtered out. You should find the Menu images like they are in Figure 7-1 .
Search WWH ::




Custom Search