- Learnt28 min · screens, sounds and juice, a best score, game over
- Basic25 min · polish your game from the later list
- Challenge 1–327 min · a front door, sound and juice, play again
- Extrabonus · 3, 2, 1, GO!
Review — where we got to 5 min
- A bug is written as should and does.
- Five usual suspects: hat, message name, reset, delete, a loop in the way.
- Watchers show numbers while you play. A probe makes a sprite say what it knows.
Quick-fire
Your score goes up, but the game feels flat. Nothing is broken. What is missing?
Reveal the answer
Feedback. A sound, a flash, a pulse — something that says “yes!” the moment it happens. Game makers call it juice.
Today’s Topic 3 min
- Screens by broadcast: title, how to play, the game, game over
- A sound for every good moment and every bad one
- Juice: a size pulse and a ghost fade
- A best score that the green flag never resets
Learning outcome
By the end of this lesson you will be able to:
- Build a title screen and an instructions screen with broadcasts.
- Add sounds and one juicy effect to your game.
- Keep a best score, and end on a game over screen with play again.
Learnt — from game to finished game 28 min
1 · Screens are messages
You met this in Level 1’s Arcade Cabinet. A screen is a broadcast. Every sprite answers every screen with show or hide.
Plan it as a grid first. Sprites down the side, screens along the top.
| Sprite | title | how to play | play | game over |
|---|---|---|---|---|
| Title | show | hide | hide | — |
| PLAY button | show | show, lower down | hide | show, as PLAY AGAIN |
| HOW TO PLAY button | show | hide | hide | — |
| How to play card | hide | show | hide | — |
| Cat Flying | hide | — | show and play | stays |
| Star and Rock | — | — | make clones | stop, delete clones |
- Click the Stage. Give it
when flag clickedandbroadcast [title v]. That is all the flag does now. - Add the signs and buttons. Give each one a stack for every screen it shows on.
- On each button, add
when this sprite clickedand a broadcast. - On the cat, change
when flag clickedtowhen I receive [play v].
when I receive [title v]
go to x: (0) y: (-10)
show
when I receive [how to play v]
go to x: (0) y: (-140)
show
when this sprite clicked
broadcast [play v]
when I receive [play v]
hide
when I receive [play v]
go to x: (0) y: (-130)
show
forever
if <key [right arrow v] pressed?> then
point in direction (90)
change x by (10)
end
if <key [left arrow v] pressed?> then
point in direction (-90)
change x by (-10)
end
end
How to use this: Click the green flag, then click HOW TO PLAY on the stage to read the card. Click PLAY to start, then click the stage once and hold ← or → to move the cat.
2 · Sounds and juice
Juice is the small stuff that makes a game feel alive. A sound, a pulse, a fade. Give every good moment and every bad moment one.
| Moment | Sounds that work |
|---|---|
| Something good | Collect, Coin, Magic Spell |
| Something bad | Oops, Bonk, Boing |
| The end | Lose, Win, Tada |
The star clone is deleted the moment it is caught. So it tells the cat with a broadcast, and the cat does the celebrating.
when I start as a clone
go to x: (pick random (-210) to (210)) y: (170)
show
repeat until <(y position) < (-170)>
change y by (-4)
if <touching [Cat Flying v]?> then
change [score v] by (1)
broadcast [caught v]
delete this clone
end
end
delete this clone
broadcast [caught v], just before the clone goes.
when I receive [caught v]
start sound [Collect v]
set size to (85) %
wait (0.1) seconds
set size to (70) %
when I receive [hit v]
start sound [Oops v]
The rock that hits you fades out with the ghost effect, instead of vanishing.
when I start as a clone
go to x: (pick random (-210) to (210)) y: (170)
show
repeat until <(y position) < (-170)>
change y by (-6)
if <touching [Cat Flying v]?> then
change [lives v] by (-1)
broadcast [hit v]
repeat (10)
change [ghost v] effect by (10)
end
delete this clone
end
end
delete this clone
How to use this: Click the green flag, then click the stage once. Hold ← or → to move the cat. Catch a star to hear it and see the cat pulse; let a rock hit you to watch it fade.
The ghost effect can fade things in, too. Here the title appears slowly.
when I receive [title v]
go to x: (0) y: (100)
set [ghost v] effect to (100)
show
repeat (20)
change [ghost v] effect by (-5)
end
3 · A best score, and game over
The best score must live through the green flag. So the flag never touches it. Score and lives are set when a game starts instead.
when I receive [play v]
set [score v] to (0)
set [lives v] to (3)
go to x: (0) y: (-130)
show
repeat until <(lives) < (1)>
if <key [right arrow v] pressed?> then
point in direction (90)
change x by (10)
end
if <key [left arrow v] pressed?> then
point in direction (-90)
change x by (-10)
end
end
broadcast [game over v]
repeat until ends the game, and the broadcast says so.
when I receive [game over v]
go to x: (0) y: (60)
show
start sound [Lose v]
if <(score) > (best)> then
set [best v] to (score)
say [New best!] for (2) seconds
end
(best).
when I receive [game over v]
stop [other scripts in sprite v]
delete this clone
How to use this: Click the green flag, then click PLAY on the stage. Click the stage once and hold ← or → to move the cat. When the game ends, click PLAY AGAIN — the best score stays.
Basic — polish your game 25 min
Take your own game, or Star Catcher, and work down the later list. One thing at a time, tested each time.
Step 1 — the screen grid
- Write your sprites down the side of a page.
- Write title, how to play, play and game over along the top.
- Fill in every box: show, hide, or what it does.
Step 2 — title and how to play
- Make the Stage broadcast title on the flag.
- Add a title and two buttons. Add the how to play card.
- Write the card: the keys first, then the goal, then how you lose.
Step 3 — change the hats
- Every game script that started on the flag now starts on
when I receive [play v]. - Move the score and lives resets into the play script.
Step 4 — sounds and juice
- Broadcast a message at every good moment and every bad moment.
- Add a sound for each, on a sprite that stays.
- Add one pulse or one fade.
Step 5 — best score and game over
- Make
(best), for all sprites. Never set it on the flag. - Broadcast game over when the game ends.
- Add the GAME OVER sign. Let it check and set the best.
- Stop the clone makers and delete the clones on game over.
Step 6 — play again
- Give the PLAY button a second costume that says PLAY AGAIN.
- Show it on game over, in that costume.
- Play three rounds without pressing the flag.
Check your PLAY button against the finished one.
when I receive [title v]
switch costume to [play v]
go to x: (0) y: (-10)
show
when I receive [how to play v]
switch costume to [play v]
go to x: (0) y: (-140)
show
when I receive [game over v]
switch costume to [play again v]
go to x: (0) y: (-60)
show
when this sprite clicked
broadcast [play v]
when I receive [play v]
hide
The best score goes back to 0.
Something sets (best) on the flag. Take that block out. The flag should only broadcast title.
Stars keep falling on the game over screen.
The Star needs its game over stack: stop [other scripts in sprite v], then delete this clone.
The cat gets a little bigger every time.
The pulse uses change size by (15). Use set size to (70) % at the end.
PLAY AGAIN starts a game with two lives, or with the old score.
The resets are still on the flag. Move them into the play script.
The title stays see-through.
The fade must add up to 100. Twenty times -5 is -100.
A front door
Your game needs a way in that explains itself.
- A title screen with your game’s name on it.
- A how to play screen. The keys come first.
- PLAY works from both screens.
- Nothing from the game shows on the title screen.
Sound and juice
Every moment that matters makes a noise, and one of them makes a movement.
- A sound for every good moment.
- A different sound for every bad moment.
- A sound for the end of the game.
- One juicy effect: a pulse, a fade, or your own idea.
Teacher note — too much juice
Some pupils put a sound on everything. Ask which three moments matter most. A sound every half-second stops meaning anything.
Best score and play again
The ending is part of the game. Make it one you can play on from.
- A game over screen that shows by itself when you lose.
- A best score that survives a new round and the green flag.
- PLAY AGAIN starts a fresh game: new score, full lives.
- No clones left over from the last round.
Teacher note — which reset goes where
The single idea here is that the flag is not the start of a game any more. Score and lives belong to a game, so they reset on play. Best belongs to the player, so nothing resets it.
Pupils who put set [best v] to (0) on the flag “to be safe” have built the bug on purpose. Ask what the flag is for now.
3, 2, 1, GO!
A countdown before every round, so the player is ready. The game must not start until it has finished.
How to use this: Click the green flag, then click PLAY on the stage and watch the countdown. After GO!, click the stage once and hold ← or → to move the cat.
Teacher notes — broadcast and wait
The trick is broadcast [countdown v] and wait, from the Choose Your Path arc. It holds the PLAY button’s script until the countdown script has finished.
when this sprite clicked
hide
broadcast [countdown v] and wait
broadcast [play v]
when I receive [countdown v]
go to x: (0) y: (20)
switch costume to [Glow-3 v]
show
wait (1) seconds
switch costume to [Glow-2 v]
wait (1) seconds
switch costume to [Glow-1 v]
wait (1) seconds
switch costume to [GO! v]
wait (0.5) seconds
hide
Going further: a Sound effect block you have not met, set [pitch v] effect to (100), can make each count higher than the last.
Summary 4 min
Same game as last week. It just feels finished now.
- A screen is a broadcast, and every sprite answers it.
- The flag only broadcasts title. A game starts on play.
- Every good and bad moment gets a sound.
- Juice is a pulse or a fade. Set the size; do not change it.
- Best is never reset. Score and lives reset on play.
- Screen
- A broadcast, and every sprite’s show or hide for it.
- Juice
- Small sounds and effects that make a game feel alive.
- Best score
- The highest score so far. The flag never resets it.
- Game over screen
- The ending, with a way to play again.
Next lesson: ship it. Credits, a project page, a saved file, and a look back at all of Level 2.