Build a GameCreating Pitch Shot

8  The Title and the Maps

Goal

By the end of this chapter, Pitch Shot opens on its title painting. Press Play, choose a place, and choose a stage. Your stars show on the maps, and a back arrow takes you home.

The game as it is at the end of this chapter. Click the game, then press Enter to start.

If your game and this chapter part ways, here is the chapter’s finished project. Unzip it first. Open it to compare, or start Chapter 9 from it.

Pitch Shot, Chapter 8 finishedZip of a Myth project · 2.8 MB

To open it, right-click the downloaded file, choose Extract All... and then Extract. Start Myth Engine, choose File › Open Project... and pick the .mythproj file in the new folder. Nunito-OFL.txt beside it comes with the game.

8.1 The Idea

The meadow opens, the tower stands, and the notes sing. You know this place now. But the beach and the snowy peaks have been waiting in the tables since Chapter 1. Nobody has seen them yet.

This chapter opens the door. The title painting fills the screen, with Pitch Shot above a coral Play button. A tune begins. Press Play, and little pictures spread across the screen: a beach, autumn woods, a castle under the moon. Choose one, and its stages appear. The meadow is one place among many.

Each screen is a Scene, as the Field has been all along. Title welcomes you. Place Map offers places, and Stage Map offers stages. Choosing a stage opens the Field you built.

The maps look busy. You’ll only place their headings, buttons and Directors by hand. The map cards make themselves.

Think of a tray with a little label on each cup. The tray puts every cup in its spot, and the label says what belongs there. A map card gets a number, cardIndex, and every part reads that number to find its picture, words and stars. One card design becomes a whole map.

Every card is open for now, because the maps haven’t learned which stage comes next. Every place and stage opens when clicked. Chapter 9 gives the maps their order, and their keys.

8.2 The Plan

Here’s how the pieces meet. Bold names are Logic.

  • Play, Enter or Space -> Open The Places -> Place Map.
  • Choose The Next Stage finds the first stage without stars. Lay Out The Places makes the place cards, and Lay Out A Place Card makes their parts.
  • Lay Out A Place Card makes each part and gives it cardIndex, then sends placed to it. Belong To A Place supplies placeIndex. Now its picture or stars can read that place number, ready to appear.
  • A place is clicked -> Open A Place -> Stage Map. Lay Out The Stages and Lay Out A Stage Card make that place’s stage cards.
  • A stage is clicked -> Open A Stage -> Field. Win The Stage keeps the best stars in Stages, ready for the maps to read.
  • A back button -> Go Back -> the screen you came from.

Build the title first. Then give the maps their stars, and make the cards that will show them. The last part joins the Field to its new front door.

8.3 Set Up

Set upWhat this chapter adds
ART (sprites, from the starter kit)
Title Painting Art
Logo Art
Tagline Pill Art
Play Button Art
Sound Icon Art
Motion Icon Art
Shade Art
Back Icon Art
Place Card Art
Place Pictures
Stage Card Art
Map Icon Art
SOUNDS (from the starter kit)
Music Title
COMMANDS (Game Settings > Input Manager)
OpenButton
KeybindingsEnter, Space
BackButton
KeybindingsEscape
INPUT CONTEXTS (Game Settings > Input Manager)
FieldActive at Start(changed)
CommandsHear It Again, Aim, Let Go, Back
CardInactive at Start(changed)
CommandsGo On, Back
MenusInactive at Start(new)
CommandsOpen
GLOBAL VARIABLES
$musicLevelNumberstarts at 0.45
$stagesPerPlaceNumberstarts at 10
$nextStageNumberstarts at 1
SCENETitle (new)
Background Color#8FD3FF
GAME SETTINGS > General > Startup
Start SceneTitle · 2D
SCENE Title: PLACE THESE
ObjectXY
Title Painting9.65.4
Title Director010.8
Logo960-140
with Z-Index = 10011
Tagline960-280
with Z-Index = 10011
Play Button960-410
with Z-Index = 10010
Motion Button1700-1000
with Z-Index = 10010
Sound Button1820-1000
with Z-Index = 10010
SCENEPlace Map (new)
Background Color#8FD3FF
SCENE Place Map: PLACE THESE
ObjectXY
Backdrop9.65.4
Shade9.65.4
Places Director010.8
Back Button90-80
with Z-Index = 10010
Places Heading740-80
with Z-Index = 10010
Motion Button1710-80
with Z-Index = 10010
Sound Button1830-80
with Z-Index = 10010
SCENEStage Map (new)
Background Color#8FD3FF
SCENE Stage Map: PLACE THESE
ObjectXY
Backdrop9.65.4
Shade9.65.4
Stages Director010.8
with Per Instance Variables > Select It = No
Back Button90-80
with Z-Index = 10010
Stages Heading740-80
with Z-Index = 10010
Motion Button1710-80
with Z-Index = 10010
Sound Button1830-80
with Z-Index = 10010
SCENE Field: PLACE THESE
ObjectXY
Map Button1620-64
with Z-Index = 10010

The Starter Kit brought ART and SOUNDS. Place Pictures is one sheet with a picture for each place. The tune is Music Title.

Make the Menus Input Context before Open, so Open goes into its Command Set. Its two keybindings are Enter and Space.

Back needs Field and Card. Select Field before adding Back, a Button Command with Escape as its keybinding. Then select Card. Its Reuse a Command… list offers Back; choose it, and press Add Keybinding to give this context Escape too. Keep Back out of Menus until Chapter 9. You make the Command once, then reuse it.

Open any Logic Component, and add the three Globals from its canvas’s Globals card. The music volume is $musicLevel, a quiet 0.45 that leaves room for the notes. Each place has $stagesPerPlace stages, 10 in all. The next stage, $nextStage, starts at 1. Each map finds the next stage without stars when it opens, so that first value won’t have to stay.

Make Title as a new Scene, with Dimension 2D. Give it the card’s Background Color, then choose Title in Game Settings > General > Startup > Start Scene. The Scene must exist before that list can offer it.

Make Place Map and Stage Map as 2D Scenes too, each with the listed Background Color. Leave their placements for later.

The back arrows will use the order the Scenes were made. They need Title, Place Map, Stage Map, then Field. Field was made first, so move its finished work to the end now.

Save your project before moving it. Select Field’s row in Resources, copy it with Ctrl+C, then press Delete and confirm Delete. The copy stays ready to paste. Clear the Resources search box, select Title’s resource row, and press Ctrl+V. The pasted Scene keeps Field’s placements and settings together, under the name Field2. Press F2, name that copy Field, and press Enter.

Earlier chapters restart the current Scene; they don’t name Field in a Scene list. Those Actions stay as they are. Later in this chapter, Open A Stage will choose the restored Field by name.

Check the move before saving again. Open Game Settings > General > Startup > Start Scene. Its list shows Title, Place Map, Stage Map, then Field, each marked 2D. After checking that order, select Field in Start Scene and run the game. Your tower, notes and win card should still work. Stop the game, then set Start Scene back to Title before saving. Something missing? Close this project without saving, reopen your saved project, and try the move again.

The Resources list displays names alphabetically. Start Scene’s list shows the stored order instead, the order the back arrows use. Chapter 8’s catch-up project already has that order if you’d like to compare.

8.4 The Front Door

First, the painting and its words. The maps can stay empty while the title takes shape.

8.4.1 Title Painting, Logo and Tagline

The Title Painting fills the world view, as the Backdrop does in the Field. It has no Logic. The Logo sits over it, fixed to the screen, with the game’s name.

ObjectTitle Painting
Transform
Bounding Box > SizeX 19.2, Y 10.8
Sprite
SpriteTitle Painting Art
Transform > SizeX 19.2, Y 10.8
ObjectLogo
Transform
Presentation > SpaceWindow / UI
Presentation > Render LayerUI
Bounding Box > SizeX 915, Y 238
Sprite
Z Index Within Object-1
SpriteLogo Art
Transform > SizeX 915, Y 238

Make the Logo as a Screen UI Object. Remove its UI Interaction, because the name isn’t a button. Its Sprite is the lettering itself, so there’s no Text / UI to add. Z Index Within Object can stay at -1; this Logo has no words drawn over its Sprite.

The Tagline sits below the name. It tells you what to listen for before you touch the slingshot.

ObjectTagline
Transform
Presentation > SpaceWindow / UI
Presentation > Render LayerUI
Bounding Box > SizeX 1140, Y 64
Sprite
Z Index Within Object-1
SpriteTagline Pill Art
Transform > SizeX 1140, Y 64
Text / UI
TextHear a note. Fling the happy note at the one that sings it.
FontNunito
Font Size34
EmphasisExtra Bold
AlignmentCenter
RenderingVector
Transform > PositionX 0, Y 2

Its Text is the game’s own sentence. Copy it from the card, and remove its UI Interaction so it doesn’t act as a button.

8.4.2 Play The Title Tune

The painting needs its tune. Play The Title Tune brings it in gently, over crossfadeSeconds, 1.5 seconds. It uses the Music bus, the same one that steps aside for a singing note in the Field.

It also hands the keys to Menus. Field and Card go off, so Enter won’t try to fling a note behind the title. You’ll use this Logic on both maps too.

Logic ComponentPlay The Title TuneAttach to: Title Director, Places Director, Stages Director

When the Title starts, the title tune plays at the game's music level, and the menu keys work.

Attach toAny Object
SHARED VARIABLES
NameTypeKindStarting Value
crossfadeSecondsNumberConstant1.5
When the Scene Starts
WhenScene Start
1Set Input Context Active
Input Context
Menus
2Set Input Context Active
Input Context
Field
Active
No
3Set Input Context Active
Input Context
Card
Active
No
4Set Volume
Audio Bus
Music
Volume
$musicLevel
5Control Sound
Operation
Crossfade Music
Sound
Music Title
Crossfade Seconds
@self.crossfadeSeconds

Control Sound’s Operation list has Crossfade Music. Pick it, then choose Music Title in the Sound list, ready to fade in as the title opens. Set Volume sets the Music bus to $musicLevel, the Global from Set up.

8.4.3 The Title Director

One Empty Object holds that Logic. It has no picture, as Game Rules has none. The Director’s work is heard.

ObjectTitle Director
Logic
Play The Title Tune

8.4.4 Open The Places

A click on Play and a press of Enter should open the same door. Both send opened to the button itself. One Event hears that message, plays Sound Click, and changes Scenes.

Logic ComponentOpen The PlacesAttach to: Play Button

The Play button, and Enter or Space on the Title (the Open Command): goes to the Place Map.

Attach toAny Object
SHARED VARIABLES
NameTypeKindStarting Value
fadeSecondsNumberConstant0.25
On Hud Activated
WhenUI Activated
1Trigger Custom Event on Object
Custom Event
opened
When Open Is Pressed
WhenCommand PressedCommand: Open
1Trigger Custom Event on Object
Custom Event
opened
On Opened
WhenopenedCustom Event
1Control Sound
Sound
Sound Click
2Go to Scene
Scene
Place Map
Transition
Fade
Transition Seconds
@self.fadeSeconds

On Hud Activated is Myth’s heading for UI Activated, as on the Listen Button in Chapter 2.

Go to Scene opens another Scene from its Scene list, with a transition between the two. Pick Place Map, with Fade as its Transition. The fade takes fadeSeconds, 0.25 seconds, a brief blink between screens. The two Events above it both use Trigger Custom Event on Object, so only this button hears opened.

8.4.5 The Play Button

The coral button has the word Play across its middle. Attach Open The Places, keeping the UI Interaction that makes this button respond to a click. A click, Enter or Space reaches Open The Places. All open the map.

ObjectPlay Button
Transform
Presentation > SpaceWindow / UI
Presentation > Render LayerUI
Bounding Box > SizeX 380, Y 130
Sprite
Z Index Within Object-1
SpritePlay Button Art
Transform > SizeX 380, Y 130
Text / UI
TextPlay
FontNunito
Font Size58
EmphasisExtra Bold
AlignmentCenter
RenderingVector
Transform > PositionX 0, Y 3
UI Interaction(as it is added)
Logic
Open The Places

8.4.6 Motion and Sound Buttons

Two small buttons sit at the bottom right. Make them now, with their UI Interactions. They get their Logic in Chapter 10, when the game learns your choices. For now, a click changes nothing.

ObjectMotion Button
Transform
Presentation > SpaceWindow / UI
Presentation > Render LayerUI
Bounding Box > SizeX 96, Y 102
Sprite
Z Index Within Object-1
SpriteMotion Icon Art
Transform > SizeX 96, Y 102
UI Interaction(as it is added)
ObjectSound Button
Transform
Presentation > SpaceWindow / UI
Presentation > Render LayerUI
Bounding Box > SizeX 96, Y 102
Sprite
Z Index Within Object-1
SpriteSound Icon Art
Transform > SizeX 96, Y 102
UI Interaction(as it is added)

Now the Title’s PLACE THESE. Place the painting and Director at their World Positions. The other five use Screen offset (px), with the Screen Anchor on the top-left dot, as in Chapter 7. Select a screen placement to find Screen Anchor in its Properties. Its dots choose the corner. Their Z-Indexes put the name and tagline in front.

Run the game. The painting opens, the name sits above Play, and the tune comes in. Press Enter. The painting fades to an empty blue Place Map.

That’s the right empty screen. Its cards are still to come.

8.5 The Maps Remember This Run

Before a map can count your stars, the Field must leave them somewhere to read.

8.5.1 Stage and Stages, Changed

Add stars to Stage, a Number starting at 0. Each stage’s row can now keep its best result.

Data StructureStageAddDelete

One stage: its place, its name, how far apart its notes sit, and where its towers and singing notes are in the Tower Plans and Notes tables.

placeTextdefault (empty)
nameTextdefault (empty)
semitonesPerFloorNumberdefault 0
firstTowerNumberdefault 0
towerCountNumberdefault 0
firstNoteNumberdefault 0
noteCountNumberdefault 0
starsNumberdefault 0
Data TableStagesData Structure: StageAddDelete
IMPORT CSV120 rows, from a file
FIRST ROWS3 of 120, to compare
Row 0Stage 1
placeSunny Meadow
nameLow and high
semitonesPerFloor12
firstTower0
towerCount1
firstNote0
noteCount2
stars0
Row 1Stage 2
placeSunny Meadow
nameHilltop echo
semitonesPerFloor6
firstTower1
towerCount1
firstNote2
noteCount2
stars0
Row 2Stage 3
placeSunny Meadow
nameTwo voices
semitonesPerFloor12
firstTower2
towerCount1
firstNote4
noteCount2
stars0

Leave Stages’ rows alone. Adding stars to its Entry Type, Stage, gives the table its new column. Each row starts with that field’s default of 0. Stages still has 120 rows.

The IMPORT CSV line remembers the file you used in Chapter 1. That file has no stars column, so there’s nothing new to import here. A fresh game has no stars.

8.5.2 Win The Stage, Changed

The win still counts stars as before. Now it compares them with the stars already kept in this stage’s row. A better result replaces the old one. A worse result leaves it alone.

Logic ComponentWin The StageAttach to: Game RulesAddDelete

Finding the called note wins the stage: the game is Stage Won, and the stage earns stars for listening. The Stages table keeps the best stars of each stage.

Attach toAny Object
SHARED VARIABLES
NameTypeKindStarting Value
twoStarWrongNotesNumberConstant2
When the Scene Starts
WhenScene Start
1Set Game State
Game State
Playing
2Set Input Context Active
Input Context
Field
3Set Input Context Active
Input Context
Card
Active
No
4Set Input Context Active
Input Context
Menus
Active
No
On Call Found
WhencallFoundCustom Event
1Set Game State
Game State
Stage Won
2If$wrongNotes == 0
Then
3Change Variable
Variable
$starsWon
Value
3
4Otherwise
5If$wrongNotes <= @self.twoStarWrongNotes
Then
6Change Variable
Variable
$starsWon
Value
2
7Otherwise
8Change Variable
Variable
$starsWon
Value
1
9If$starsWon > data("Stages", $stage - 1, "stars")
Then
10Set Data Cell
Table
Stages
Row
$stage - 1
Column
"stars"
Value
$starsWon

The last If goes after the whole star-counting If, on the Event’s main line. It must run whichever branch counted the stars. Set Data Cell writes the better result into Stages, picked from its Table list. Its Row is $stage - 1, because the first stage lives in row 0.

At Scene Start, Menus goes off too. The Field gets its keys back when you leave a map.

These stars last while the game runs. Chapter 10 will make them stay after you close the window and open the game again.

8.6 A Place for Every Picture

Now the Place Map. Build the little parts first, then the card that makes them, and last the Director that makes the cards. Nothing shows until that Director is placed.

8.6.1 Map Spot

Every part needs to know which card it belongs to. That’s Map Spot. Its cardIndex is the number handed over by whoever made it. Its other fields keep what the part learns from that number.

Data StructureMap Spot

What the Logic of one part of a map card shares: its card number on the map (cardIndex, told by whoever made it), its place (on the Place Map) or its stage (on the Stage Map), how many of the place's stars are earned, which of a stage card's stars it is.

cardIndexNumberdefault 0
placeIndexNumberdefault 0
stageNumberNumberdefault 1
starsEarnedNumberdefault 0
starNumberNumberdefault 1

Make it once. Each Logic that names it brings a copy to its Object, as Note State came to the singing notes.

8.6.2 Belong To A Place

The first place card has cardIndex 0. That’s also the first row of Places, so this Logic copies cardIndex into placeIndex. Every part of the card can now look up its place.

Logic ComponentBelong To A PlaceAttach to: Place Card, Place Picture, Place Name, Place Stars

One part of a place card: from its card number (cardIndex, 0 to 11) it keeps its place in placeIndex. It reads cardIndex (its Map Spot), set by Lay Out The Places (the card) or Lay Out A Place Card (its other parts), when it makes the part.

Attach toAny Object
DATA STRUCTURES
Map Spotself.mapSpot
On Placed
WhenplacedCustom Event
1Change Component Value
Component Value
self.mapSpot.placeIndex
Value
self.mapSpot.cardIndex

It waits for placed, not Create. The maker fills in cardIndex after Create Instance, then sends placed when the number is ready. You’ve used that hand-off for the singing notes.

8.6.3 Show The Place Picture

The beach’s card should show the beach. Place Pictures holds all the little paintings in the Places table’s order. Set Frame chooses the painting at placeIndex.

Logic ComponentShow The Place PictureAttach to: Place Picture

The picture of one place on its card (frame n is place n). It reads placeIndex (its Map Spot), set by Belong To A Place, attached first.

Attach toAny Object
DATA STRUCTURES
Map Spotself.mapSpot
On Placed
WhenplacedCustom Event
1Set Frame
Frame
self.mapSpot.placeIndex

8.6.4 The Place Picture and Place Name

The picture is a world Object. It sits above the card’s middle, and its draw order puts it in front of the card.

ObjectPlace Picture
Transform
Bounding Box > SizeX 2.56, Y 1.44
Sprite
Scene Depth Draw Order11
SpritePlace Pictures
Transform > SizeX 2.56, Y 1.44
Data Structure
From LogicBelong To A Place, Show The Place Picture
Data StructureMap Spot
Logic
Belong To A Place
Show The Place Picture

Attach Belong To A Place first, then Show The Place Picture. Both hear placed. The first gives the part its placeIndex before the second reads it.

The name is a Screen UI Object with text, as the Stage Title was. Its template reads the name from Places using placeIndex. Copy the braces and the formula from the card.

ObjectPlace Name
Transform
Presentation > SpaceWindow / UI
Presentation > Render LayerUI
Bounding Box > SizeX 270, Y 40
Text / UI
Text{data("Places", placeIndex, "name")}
FontNunito
Font Size27
EmphasisExtra Bold
Color#3A1D0B
AlignmentCenter
RenderingVector
Data Structure
From LogicBelong To A Place
Data StructureMap Spot
Logic
Belong To A Place

Remove the name’s UI Interaction. Attach Belong To A Place; its Map Spot fields are available to the text template under their plain names.

8.6.5 The Place Star

One golden star sits beside the count. It stays lit, because it’s the label for the total, rather than a result for one stage.

ObjectPlace Star
Transform
Bounding Box > SizeX 0.34, Y 0.34
Sprite
Scene Depth Draw Order12
SpriteStar Art
Frame1
Transform > SizeX 0.34, Y 0.34

Pick Star Art in the Sprite’s Appearance, and type 1 into Frame there. That’s the lit picture. This star has no Logic and no Map Spot.

8.6.6 Count The Place’s Stars

A place has several stages. This Logic adds their stars into one count, starsEarned, for the place’s card. The Repeat visits the place’s rows in Stages, starting at its first stage.

Logic ComponentCount The Place's StarsAttach to: Place Stars

How many of a place's stars (3 for each of its $stagesPerPlace stages) have been earned, shown on its card ("<n> of 30"). It reads placeIndex (its Map Spot), set by Belong To A Place, attached first.

Attach toAny Object
DATA STRUCTURES
Map Spotself.mapSpot
On Placed
WhenplacedCustom Event
1Declare Variable
Name
stageRow
Value
0
2Change Component Value
Component Value
self.mapSpot.starsEarned
Value
0
3Repeat$stagesPerPlacetimes
Each time
4Change Variable
Variable
stageRow
Value
self.mapSpot.placeIndex * $stagesPerPlace + local.index
5Change Component Value
Component Value
self.mapSpot.starsEarned
Operator
+=
Value
data("Stages", stageRow, "stars")

stageRow is a Declare Variable for this one count. The lasting total lives in Map Spot, where the card’s text can read it.

8.6.7 The Place Stars

The count sits beside the golden star. Its template joins starsEarned to the largest possible total: $stagesPerPlace * 3. A fresh place reads 0 of 30.

ObjectPlace Stars
Transform
Presentation > SpaceWindow / UI
Presentation > Render LayerUI
Bounding Box > SizeX 150, Y 34
Text / UI
Text{starsEarned} of {$stagesPerPlace * 3}
FontNunito
Font Size23
EmphasisExtra Bold
Color#3A1D0B
AlignmentCenter
RenderingVector
Data Structure
From LogicBelong To A Place, Count The Place's Stars
Data StructureMap Spot
Logic
Belong To A Place
Count The Place's Stars

Attach Belong To A Place before Count The Place’s Stars. Remove the UI Interaction.

8.6.8 Open A Place

A place card uses two frames here: plain, and highlighted. When placed arrives, it lights if it contains $nextStage, the next stage without stars. A click opens Stage Map. The place’s first stage becomes $stage, ready for that map to find the place you chose.

Logic ComponentOpen A PlaceAttach to: Place Card

One place card: highlighted when the stage to play next ($nextStage) is in its place; clicking it opens the place's Stage Map. It reads placeIndex (its Map Spot), set by Belong To A Place, attached first (cardIndex by Lay Out The Places, when it makes the card).

Attach toAny Object
DATA STRUCTURES
Map Spotself.mapSpot
SHARED VARIABLES
NameTypeKindStarting Value
fadeSecondsNumberConstant0.25
On Placed
WhenplacedCustom Event
1Iffloor(($nextStage - 1) / $stagesPerPlace) == self.mapSpot.placeIndex
Then
2Set Frame
Frame
1
3Otherwise
4Set Frame
Frame
0
When Left Is Clicked
WhenMouse Pressed on ObjectMouse button: left
1Control Sound
Sound
Sound Click
2Change Variable
Variable
$stage
Value
self.mapSpot.placeIndex * $stagesPerPlace + 1
3Go to Scene
Scene
Stage Map
Transition
Fade
Transition Seconds
@self.fadeSeconds

This click is Mouse Pressed on Object, unlike a Screen UI button’s UI Activated. Choose left as its Mouse button. Its Bounding Box lets the Sprite-only card receive the click without a Collider. Events: the When bars shows where that choice lives.

8.6.9 Lay Out A Place Card

Each map card makes its own picture, name, star and count. Each starts from the card’s middle, then moves by the offsets on this card. Change pictureAbove, for instance, and every picture moves together.

Logic ComponentLay Out A Place CardAttach to: Place Card

When the card is placed, makes the rest of it around its middle: the place's picture, its name, a star and the count of its stars, each told the card's number. It reads cardIndex (its Map Spot), set by Lay Out The Places, when it makes the card.

Attach toAny Object
DATA STRUCTURES
Map Spotself.mapSpot
SHARED VARIABLES
NameTypeKindStarting Value
placePictureObjectConstantNone
placeNameObjectConstantNone
placeStarObjectConstantNone
placeStarsObjectConstantNone
pictureAboveNumberConstant0.44
nameBelowNumberConstant0.62
starsBelowNumberConstant1.04
starLeftNumberConstant0.4
countRightNumberConstant0.5
On Placed
WhenplacedCustom Event
1Create Instance
Object to Create
@self.placePicture
X
self.transform.position.x
Y
self.transform.position.y + @self.pictureAbove
Variable Name
newPicture
2Change Variable
Variable
newPicture.cardIndex
Value
self.mapSpot.cardIndex
3Trigger Custom Event on Object
Applies to
newPicture
Custom Event
placed
4Create Instance
Object to Create
@self.placeName
X
0
Y
0
Variable Name
newName
5Set Position
Applies to
newName
X
self.transform.position.x
Y
self.transform.position.y - @self.nameBelow
6Change Variable
Variable
newName.cardIndex
Value
self.mapSpot.cardIndex
7Trigger Custom Event on Object
Applies to
newName
Custom Event
placed
8Create Instance
Object to Create
@self.placeStar
X
self.transform.position.x - @self.starLeft
Y
self.transform.position.y - @self.starsBelow
Variable Name
newStar
9Create Instance
Object to Create
@self.placeStars
X
0
Y
0
Variable Name
newStarCount
10Set Position
Applies to
newStarCount
X
self.transform.position.x + @self.countRight
Y
self.transform.position.y - @self.starsBelow
11Change Variable
Variable
newStarCount.cardIndex
Value
self.mapSpot.cardIndex
12Trigger Custom Event on Object
Applies to
newStarCount
Custom Event
placed

The name and count are screen text. They start at the screen’s corner, then Set Position moves each to where its point in the world shows. Leave Set Position’s coordinate space at World. Set Position handles the crossing from meters to screen pixels.

Each part that needs a number gets cardIndex before placed arrives. A newPicture.cardIndex reads Map Spot’s field through its short name, as newDot.dotNumber did in Chapter 3. The little golden star needs neither. It has no number to read and no decision to make, so it needs no Map Spot.

8.6.10 The Place Card

The parts are ready. Make their card as a world Object, with Place Card Art, and attach its Logic in the order shown.

ObjectPlace Card
Transform
Bounding Box > SizeX 2.86, Y 2.68
Sprite
Scene Depth Draw Order10
SpritePlace Card Art
Transform > SizeX 2.86, Y 2.68
Data Structure
From LogicBelong To A Place, Open A Place, Lay Out A Place Card
Data StructureMap Spot
Logic
Belong To A Place
Open A Place
Lay Out A Place Card
Shared Variables
placePicturePlace Picture
placeNamePlace Name
placeStarPlace Star
placeStarsPlace Stars

Belong To A Place comes first. Open A Place and Lay Out A Place Card read the place number it sets. Give the Object’s Variables their choices from the card. The design has its parts.

Don’t place a Place Card in the Scene. Its Director makes the whole map from this one Object, giving every card its number.

8.6.11 Choose The Next Stage

The maps need somewhere to point. Choose The Next Stage searches Stages for the first row whose stars are 0. That’s the next stage to play. If every row has stars, it chooses the last stage instead.

Logic ComponentChoose The Next StageAttach to: Places Director, Stages Director

When a map opens, $nextStage is the stage to play next: the first stage without stars, or the last stage when every stage has some (the maps highlight it). On the Place Map it also becomes $stage, so the map shows its place.

Attach toAny Object
PER INSTANCE VARIABLES
NameTypeStarting Value
selectItBooleanYes
When the Scene Starts
WhenScene Start
1Declare Variable
Name
rowWithoutStars
Value
-1
2Change Variable
Variable
rowWithoutStars
Value
dataFind("Stages", "stars", 0)
3IfrowWithoutStars >= 0
Then
4Change Variable
Variable
$nextStage
Value
rowWithoutStars + 1
5Otherwise
6Change Variable
Variable
$nextStage
Value
dataCount("Stages")
7Ifself.selectIt == true
Then
8Change Variable
Variable
$stage
Value
$nextStage

dataFind returns -1 when no row matches. That sends the If to its Otherwise branch, which chooses the last stage. It keeps that answer in $nextStage. On Place Map, it also sets $stage, so the backdrop belongs to the place you’re heading for.

selectIt is a Per Instance Variable, as starNumber was in Chapter 7. Leave it Yes here. Stage Map will set its own placement to No, because you already chose a place.

8.6.12 Lay Out The Places

The map lays itself out from left to right. At columns cards it starts again on the left, one row lower, until every place has its spot. The Places table decides how many cards there are.

Logic ComponentLay Out The PlacesAttach to: Places Director

When the Place Map is made, lays out a card for each place (each row of the Places table): columns cards to a row from the top left, each told its number (cardIndex).

Attach toAny Object
SHARED VARIABLES
NameTypeKindStarting Value
placeCardObjectConstantNone
columnsNumberConstant6
firstCardXNumberConstant1.85
firstCardYNumberConstant7.35
acrossNumberConstant3.1
downNumberConstant3.1
When Created
WhenCreate
1Declare Variable
Name
cardX
Value
0
2Declare Variable
Name
cardY
Value
0
3RepeatdataCount("Places")times
Each time
4Change Variable
Variable
cardX
Value
@self.firstCardX + mod(local.index, @self.columns) * @self.across
5Change Variable
Variable
cardY
Value
@self.firstCardY - floor(local.index / @self.columns) * @self.down
6Create Instance
Object to Create
@self.placeCard
X
cardX
Y
cardY
Variable Name
newCard
7Change Variable
Variable
newCard.cardIndex
Value
local.index
8Trigger Custom Event on Object
Applies to
newCard
Custom Event
placed

The two sums are the tray’s slots. mod counts across a row, starting over at each new row. floor counts how many whole rows have gone before this card. One moves across; the other moves down.

Choose The Next Stage runs on Scene Start. This Logic runs on Create, after Scene Start, so $nextStage is ready before any card reads it.

8.6.13 The Places Director

The Empty Object carries the tune, the choice, and the layout. Set placeCard to Place Card under Variables on the Director, so it knows which Object to make. That one choice supplies every card on the map.

ObjectPlaces Director
Logic
Play The Title Tune
Choose The Next Stage
Lay Out The Places
Shared Variables
placeCardPlace Card

8.6.14 Shade, Places Heading and the Back Button

A soft shade lies over the backdrop, behind the cards. That lets you read the cards.

ObjectShade
Transform
Bounding Box > SizeX 20, Y 11.6
Sprite
Scene Depth Draw Order2
SpriteShade Art
Transform > SizeX 20, Y 11.6
ObjectPlaces Heading
Transform
Presentation > SpaceWindow / UI
Presentation > Render LayerUI
Bounding Box > SizeX 900, Y 80
Text / UI
TextChoose a place
FontNunito
Font Size56
EmphasisExtra Bold
AlignmentCenter
RenderingVector

The heading says Choose a place. Make it as a Screen UI Object with text, and remove its UI Interaction.

8.6.15 Go Back

The back arrow works like Play: the click and the key meet in one Event. This time the message is goBack. Previous Scene opens the preceding Scene in the project’s stored order. It has no boxes to fill. That order is Title, Place Map, Stage Map, Field, from Set up. So the Field’s arrow always leads to Stage Map.

Logic ComponentGo BackAttach to: Back Button, Map Button

The back arrow and the Map button (and Escape): go back one screen (Field to Stage Map, Stage Map to Place Map, Place Map to Title).

Attach toAny Object
On Hud Activated
WhenUI Activated
1Trigger Custom Event on Object
Custom Event
goBack
When Back Is Pressed
WhenCommand PressedCommand: Back
1Trigger Custom Event on Object
Custom Event
goBack
On Go Back
WhengoBackCustom Event
1Control Sound
Sound
Sound Click
2Previous Scene
ObjectBack Button
Transform
Presentation > SpaceWindow / UI
Presentation > Render LayerUI
Bounding Box > SizeX 96, Y 102
Sprite
Z Index Within Object-1
SpriteBack Icon Art
Transform > SizeX 96, Y 102
UI Interaction(as it is added)
Logic
Go Back

Keep the UI Interaction. Attach Go Back. On Hud Activated is Myth’s heading for UI Activated, as on the Listen Button in Chapter 2. On the maps, use the arrow. Escape is in Field and Card for now; Chapter 9 adds it to Menus too.

Now the Place Map’s PLACE THESE. Reuse the Backdrop from Chapter 1. Place Shade and Places Director at their World Positions, then the heading and the three buttons at their Screen Offsets. The Backdrop will pick the place through $stage, as it does in the Field.

Run the game, press Play, and the pictures spread into rows. The first place is highlighted. Its count says 0 of 30. Click the back arrow, and you’re home at the title.

Click a place again, and Stage Map opens empty. Its cards come next.

8.7 A Stage Behind Every Card

This map repeats the idea, one step deeper. A card’s number now belongs to a place, so it needs the place’s first stage too.

8.7.1 Belong To A Stage

A Stage Map offers only the stages of the place you chose. Belong To A Stage finds that place’s first stage, then counts forward by cardIndex. The answer is stageNumber.

Logic ComponentBelong To A StageAttach to: Stage Card, Stage Number, Stage Name, Stage Star

One part of a stage card: from its card number (cardIndex, 0 to 9) its stage is cardIndex + 1 of the place shown, kept in stageNumber. It reads cardIndex (its Map Spot), set by Lay Out The Stages (the card) or Lay Out A Stage Card (its other parts), when it makes the part.

Attach toAny Object
DATA STRUCTURES
Map Spotself.mapSpot
On Placed
WhenplacedCustom Event
1Declare Variable
Name
firstStage
Value
1
2Change Variable
Variable
firstStage
Value
floor(($stage - 1) / $stagesPerPlace) * $stagesPerPlace + 1
3Change Component Value
Component Value
self.mapSpot.stageNumber
Value
firstStage + self.mapSpot.cardIndex

The first card has index 0, but stage numbers begin at 1. The card’s sum includes that small step. You’ll attach this Logic first on each stage part, before anything reads its stageNumber.

8.7.2 Stage Number and Stage Name

Both are Screen UI Objects with text, carrying Belong To A Stage. One shows stageNumber itself. The other reads that stage’s name from Stages, one row back from its number.

ObjectStage Number
Transform
Presentation > SpaceWindow / UI
Presentation > Render LayerUI
Bounding Box > SizeX 200, Y 64
Text / UI
Text{stageNumber}
FontNunito
Font Size56
EmphasisExtra Bold
Color#3A1D0B
AlignmentCenter
RenderingVector
Data Structure
From LogicBelong To A Stage
Data StructureMap Spot
Logic
Belong To A Stage
ObjectStage Name
Transform
Presentation > SpaceWindow / UI
Presentation > Render LayerUI
Bounding Box > SizeX 310, Y 34
Text / UI
Text{data("Stages", stageNumber - 1, "name")}
FontNunito
Font Size22
EmphasisExtra Bold
Color#3A1D0B
AlignmentCenter
RenderingVector
Data Structure
From LogicBelong To A Stage
Data StructureMap Spot
Logic
Belong To A Stage

Remove their UI Interactions. Copy each Text template from its card, braces and all.

8.7.3 Light A Stage Star

The stars look familiar. Each asks whether this stage earned at least its own starNumber. Two earned stars light the first two, and leave the last dim, as on the win card.

Logic ComponentLight A Stage StarAttach to: Stage Star

One of the three stars on a stage card (its starNumber, 1 to 3, told by the card that made it): lit when the stage has earned at least that many stars. It reads stageNumber and starNumber (its Map Spot), set by Belong To A Stage, attached first (starNumber by Lay Out A Stage Card, when it makes the star).

Attach toAny Object
DATA STRUCTURES
Map Spotself.mapSpot
On Placed
WhenplacedCustom Event
1Ifdata("Stages", self.mapSpot.stageNumber - 1, "stars") >= self.mapSpot.starNumber
Then
2Set Frame
Frame
1
3Otherwise
4Set Frame
Frame
0

This time the count comes from Stages. starNumber lives in Map Spot, because the card that makes the stars will fill it in.

8.7.4 The Stage Star

Make one world Object, shared by every stage card’s stars. Belong To A Stage gives it its stage, and Light A Stage Star picks its frame. Keep those Logic Components in that order.

ObjectStage Star
Transform
Bounding Box > SizeX 0.4, Y 0.4
Sprite
Scene Depth Draw Order12
SpriteStar Art
Transform > SizeX 0.4, Y 0.4
Data Structure
From LogicBelong To A Stage, Light A Stage Star
Data StructureMap Spot
Logic
Belong To A Stage
Light A Stage Star

Logic makes all the stars when the map opens, so none are placed by hand.

8.7.5 Open A Stage

The map offers little doors back into the game. Each has its own stage number. Open A Stage passes that number to $stage before opening Field. The highlighted door points to $nextStage.

Logic ComponentOpen A StageAttach to: Stage Card

A stage card: highlighted when it is the stage to play next; clicking it starts that stage. It reads stageNumber (its Map Spot), set by Belong To A Stage, attached first (cardIndex by Lay Out The Stages, when it makes the card).

Attach toAny Object
DATA STRUCTURES
Map Spotself.mapSpot
SHARED VARIABLES
NameTypeKindStarting Value
fadeSecondsNumberConstant0.25
On Placed
WhenplacedCustom Event
1Ifself.mapSpot.stageNumber == $nextStage
Then
2Set Frame
Frame
1
3Otherwise
4Set Frame
Frame
0
When Left Is Clicked
WhenMouse Pressed on ObjectMouse button: left
1Control Sound
Sound
Sound Click
2Change Variable
Variable
$stage
Value
self.mapSpot.stageNumber
3Go to Scene
Scene
Field
Transition
Fade
Transition Seconds
@self.fadeSeconds

8.7.6 Lay Out A Stage Card

The card makes its number and name, then its stars. The stars share one picture, but each gets its own starNumber before placed arrives. Their spacing spreads them around the card’s middle.

Logic ComponentLay Out A Stage CardAttach to: Stage Card

When the card is placed, makes the rest of it around its middle: the stage's number and name, its three stars, each told the card's number (and each star which it is). It reads cardIndex and starNumber (its Map Spot), set by Lay Out The Stages, when it makes the card.

Attach toAny Object
DATA STRUCTURES
Map Spotself.mapSpot
SHARED VARIABLES
NameTypeKindStarting Value
numberLabelObjectConstantNone
nameLabelObjectConstantNone
stageStarObjectConstantNone
numberAboveNumberConstant0.46
nameBelowNumberConstant0.66
starsBelowNumberConstant0.14
starSpacingNumberConstant0.44
On Placed
WhenplacedCustom Event
1Create Instance
Object to Create
@self.numberLabel
X
0
Y
0
Variable Name
newNumber
2Set Position
Applies to
newNumber
X
self.transform.position.x
Y
self.transform.position.y + @self.numberAbove
3Change Variable
Variable
newNumber.cardIndex
Value
self.mapSpot.cardIndex
4Trigger Custom Event on Object
Applies to
newNumber
Custom Event
placed
5Create Instance
Object to Create
@self.nameLabel
X
0
Y
0
Variable Name
newName
6Set Position
Applies to
newName
X
self.transform.position.x
Y
self.transform.position.y - @self.nameBelow
7Change Variable
Variable
newName.cardIndex
Value
self.mapSpot.cardIndex
8Trigger Custom Event on Object
Applies to
newName
Custom Event
placed
9Repeat3times
Each time
10Create Instance
Object to Create
@self.stageStar
X
self.transform.position.x + (local.index - 1) * @self.starSpacing
Y
self.transform.position.y - @self.starsBelow
Variable Name
newStar
11Change Variable
Variable
newStar.cardIndex
Value
self.mapSpot.cardIndex
12Change Variable
Variable
newStar.starNumber
Value
local.index + 1
13Trigger Custom Event on Object
Applies to
newStar
Custom Event
placed

The Description mixes the two layouts’ jobs. Follow the Actions: this card’s Repeat supplies starNumber to each star, while Lay Out The Stages supplies the parent’s cardIndex. You may describe that in your own words. Descriptions don’t run.

The Repeat makes the stars. Its index begins at 0, so starNumber gets local.index + 1. The Set Positions for the two texts work as they did on the place card.

8.7.7 The Stage Card

The waiting stage card has no words or stars of its own yet. Its Variables name the parts it will make. Keep Belong To A Stage first, so the rest receive the stage it belongs to.

ObjectStage Card
Transform
Bounding Box > SizeX 3.3, Y 2.02
Sprite
Scene Depth Draw Order10
SpriteStage Card Art
Transform > SizeX 3.3, Y 2.02
Data Structure
From LogicBelong To A Stage, Open A Stage, Lay Out A Stage Card
Data StructureMap Spot
Logic
Belong To A Stage
Open A Stage
Lay Out A Stage Card
Shared Variables
numberLabelStage Number
nameLabelStage Name
stageStarStage Star

8.7.8 Lay Out The Stages

This is the tray again. This time it uses stageCard and five columns, with $stagesPerPlace cards to make. The wider cards leave room for their names.

Logic ComponentLay Out The StagesAttach to: Stages Director

When the Stage Map is made, lays out a card for each stage of the place shown: columns cards to a row from the top left, each told its number (cardIndex).

Attach toAny Object
SHARED VARIABLES
NameTypeKindStarting Value
stageCardObjectConstantNone
columnsNumberConstant5
firstCardXNumberConstant2.4
firstCardYNumberConstant6.9
acrossNumberConstant3.6
downNumberConstant2.6
When Created
WhenCreate
1Declare Variable
Name
cardX
Value
0
2Declare Variable
Name
cardY
Value
0
3Repeat$stagesPerPlacetimes
Each time
4Change Variable
Variable
cardX
Value
@self.firstCardX + mod(local.index, @self.columns) * @self.across
5Change Variable
Variable
cardY
Value
@self.firstCardY - floor(local.index / @self.columns) * @self.down
6Create Instance
Object to Create
@self.stageCard
X
cardX
Y
cardY
Variable Name
newCard
7Change Variable
Variable
newCard.cardIndex
Value
local.index
8Trigger Custom Event on Object
Applies to
newCard
Custom Event
placed

8.7.9 The Stages Director and Stages Heading

The Director carries the same tune and next-stage choice as Places Director, with the stage layout in place of the place layout. Set stageCard to Stage Card under Variables.

ObjectStages Director
Logic
Play The Title Tune
Choose The Next Stage
Lay Out The Stages
Shared Variables
stageCardStage Card

The heading reads the place’s name using $stage. No Logic needs to copy the name into the text, because its template reads the table itself. Copy the Text template, then remove the UI Interaction. Its 10 is the count this template uses to find a place’s first stage. Keep it as shown; the table lookup allows formulas too.

ObjectStages Heading
Transform
Presentation > SpaceWindow / UI
Presentation > Render LayerUI
Bounding Box > SizeX 900, Y 80
Text / UI
Text{data("Places", floor(($stage - 1) / 10), "name")}
FontNunito
Font Size56
EmphasisExtra Bold
AlignmentCenter
RenderingVector

Now Stage Map’s PLACE THESE. Reuse Backdrop, Shade and the three buttons. The new Director and heading go at their own positions, where the Place Map had its pair. On this Director’s placement, open Per Instance Variables and set Select It to No. Otherwise its next-stage choice would replace the place you clicked.

Run the game and choose a place. Its name appears above its stages. Click a stage. The map fades, its painting fills the screen, and its notes sing their opening.

You’ve come back to the game you built.

8.8 The Way Home

Last, the Field needs a way back to its map, and its tune needs the same music level as the menus.

8.8.1 The Map Button

The Map Button carries Go Back, as the back arrows do. Keep its UI Interaction. Place it in the Field using the last PLACE THESE line, beside the restart button at the top.

ObjectMap Button
Transform
Presentation > SpaceWindow / UI
Presentation > Render LayerUI
Bounding Box > SizeX 96, Y 102
Sprite
Z Index Within Object-1
SpriteMap Icon Art
Transform > SizeX 96, Y 102
UI Interaction(as it is added)
Logic
Go Back

Its Back Command works while Field is active and while Card is active. So Escape can leave a stage while you aim, or while its win card is up.

8.8.2 Make Way For The Notes, Changed

The menu tune and the Field’s tune now share $musicLevel. Make Way For The Notes uses it when the Scene starts, and as the singing fades the tune down and back up.

Logic ComponentMake Way For The NotesAttach to: Game RulesAddDelete

Keeps the music quiet under the notes ($musicLevel), fades it down while a note sings and brings it back afterwards, so the notes are always heard clearly.

Attach toAny Object
DATA STRUCTURES
Make Way For The Notes Dataself.makeWayForTheNotesData
SHARED VARIABLES
NameTypeKindStarting Value
musicVolumeNumberConstant0.45
holdSecondsNumberConstant1.6
secondsToFadeOutNumberConstant0.25
secondsToFadeInNumberConstant1.4
stepSecondsNumberConstant0.05
When the Scene Starts
WhenScene Start
1Change Component Value
Component Value
self.makeWayForTheNotesData.loudness
Value
1
2Change Component Value
Component Value
self.makeWayForTheNotesData.targetLoudness
Value
1
3Set Volume
Audio Bus
Music
Volume
$musicLevel
Volume
@self.musicVolume
On Note Sung
WhennoteSungCustom Event
1Change Component Value
Component Value
self.makeWayForTheNotesData.targetLoudness
Value
0
2Start Recurring Timer
Timer Name
"musicBack"
Repeat Every (s)
@self.holdSeconds
Ring Once
Yes
3Start Recurring Timer
Timer Name
"fadeMusic"
Repeat Every (s)
@self.stepSeconds
First Delay (s)
@self.stepSeconds
On the Music Back Timer
WhenRecurring TimerTimer name: musicBack
1Change Component Value
Component Value
self.makeWayForTheNotesData.targetLoudness
Value
1
2Start Recurring Timer
Timer Name
"fadeMusic"
Repeat Every (s)
@self.stepSeconds
First Delay (s)
@self.stepSeconds
On the Fade Music Timer
WhenRecurring TimerTimer name: fadeMusic
1Ifself.makeWayForTheNotesData.loudness > self.makeWayForTheNotesData.targetLoudness
Then
2Change Component Value
Component Value
self.makeWayForTheNotesData.loudness
Value
max(self.makeWayForTheNotesData.targetLoudness, self.makeWayForTheNotesData.loudness - @self.stepSeconds / @self.secondsToFadeOut)
3Ifself.makeWayForTheNotesData.loudness < self.makeWayForTheNotesData.targetLoudness
Then
4Change Component Value
Component Value
self.makeWayForTheNotesData.loudness
Value
min(self.makeWayForTheNotesData.targetLoudness, self.makeWayForTheNotesData.loudness + @self.stepSeconds / @self.secondsToFadeIn)
5Set Volume
Audio Bus
Music
Volume
self.makeWayForTheNotesData.loudness * $musicLevel
Volume
self.makeWayForTheNotesData.loudness * @self.musicVolume
6Ifself.makeWayForTheNotesData.loudness == self.makeWayForTheNotesData.targetLoudness
Then
7Stop Recurring Timer
Timer Name
"fadeMusic"

Each Set Volume still has one Volume box. Use the green formula first. The fade still works as it did in Chapter 2.

Then remove musicVolume using its trash button on the canvas’s Shared Variables card. The menus share that job now, through $musicLevel, so the old value has nothing left to do.

Run the game. Choose a place and stage, then click the Map Button. Stage Map returns. Its back arrow goes to Place Map, and the next goes to Title.

Play it!

Watch each door open, and listen as the tune changes.

  • The game opens on the title painting, with the logo, tagline and Play button. The tune comes in gently.
  • Click Play, or press Enter or Space. Place Map shows two rows of pictures, with Choose a place above them.
  • A new game’s place counts read 0 of 30. The place containing the next stage is highlighted.
  • Click the beach’s card. Stage Map shows its name, stage numbers and names, and dim stars. Click any stage there, and the beach opens behind its towers.
  • Win a stage. Its stars are kept for this run. Return to its map, and that stage’s stars show the result.
  • The Map Button returns to Stage Map. From there, the back arrow leads through Place Map to Title, one screen at a time.
  • Press Escape in the Field, and it returns to the map too. Use the arrows on the maps for now.
  • Click Sound or Motion. Their pictures are there, but their choices wait for Chapter 10.
How it works

The Director makes cards. Each card gets a number, then makes its own parts. The parts use that number to find a picture, a name or a count. A click opens the Field. The Field leaves its best stars in Stages, ready for the maps to read.

Underneath it is the same idea as the towers: make one design, then give each copy its own data. The layout decides where a card stands. Its number decides what it means.

8.9 If It Didn’t Work

With so many little parts, a missing label can leave the right card showing the wrong words. Look for the first place where the picture parts company with the plan.

The Field still opens first? Look at Start Scene under General > Startup. The list should have Title picked, so the game starts at its front door.

Play opens an empty map? Is Places Director placed in Place Map, and is placeCard set to Place Card under its Variables? The Director makes the cards, so a missing Director leaves a blue screen.

Every place shows the same picture? Look at the Place Picture’s Attached Logic. Belong To A Place goes before Show The Place Picture. And does Lay Out A Place Card give each newPicture its cardIndex before sending placed?

The back arrow opens the wrong Scene? Look at the order from Set up. Previous Scene uses the project’s stored order, which is separate from the alphabetical Resources list. Put Field last with the copy-and-paste move there, or compare with this chapter’s catch-up project. The back arrows lead home.

The picture is right, but the name is missing? Look at Place Name’s Text template and its Map Spot. Attach Belong To A Place to the name before you test it, so its Map Spot gets filled in. The picture and the name each need their own cardIndex before placed arrives.

You click the beach, but Sunny Meadow’s stages appear? Look at Stages Director’s placement. Set Select It to No under Per Instance Variables. Now the place you clicked stays chosen, instead of being replaced by the next stage without stars.

Every stage’s stars look the same? Look at Lay Out A Stage Card’s newStar.starNumber, and at Light A Stage Star on Stage Star. Each star needs both its stage number and its own number.

Escape does nothing on a map? That’s expected in this chapter. Use the back arrow; Menus gets Back in Chapter 9. If Escape does nothing in the Field, add Back to both Field and Card’s Command Sets.

Each of these is one small fix. Make it, open the map again, and see which part changed. The catch-up download in the Goal has this chapter’s finished game if you’d like to compare.

Challenge

The cards are yours to arrange. Change pictureAbove in Place Card’s Variables from 0.44 to 0.65, and every place picture rises together. Or change crossfadeSeconds on Title Director from 1.5 to 6, and let the title tune arrive more slowly. What would you change to make your own game’s front door? Put the values back before Chapter 9.

Still stuck? Search the manual, or ask in the Myth Engine Discord (opens a new tab).

You can step from the title into any place, and find your way home again. In Chapter 9, the maps learn which one opens next.