Learning Goals 3 min
By the end of this lesson you will be able to:
- Build a title screen sprite that fills the Stage at the start of the game, hides on a key press, and broadcasts game-start so the rest of the game knows to begin.
- Build an end screen sprite that listens for when I receive (victory v), shows a "YOU WIN!" graphic, and uses say with join to display the player's final score and play time.
- Build a credits sprite that slowly scrolls upward — by repeatedly change y by (1) in a forever loop — listing the creator's name and any borrowed assets.
Warm-Up — the unfinished feeling 7 min
You've spent six lessons building a working multi-level platformer. Levels load, gravity works, coins collect, checkpoints save, and (since last lesson) the boss can be defeated. So why does it still feel like a "school project" instead of a real game?
when flag clicked
go to x: (-200) y: (-100)
set [score v] to (0)
set [level v] to (1)
broadcast (load-level v)
Predict: what's missing from a "real" game that you have right now? Name three things.
Reveal the answer
Almost every player names the same three things: a title screen (the name of the game + "press start"), an end screen (you win! / you lose, with the final score), and credits (who made it, who helped). None of these change the gameplay at all — but without them, the project feels like a tech demo. With them, it feels like a finished thing you'd be proud to share on scratch.mit.edu.
The reason students skip polish is that it feels like "extra work that doesn't matter". The reason professionals never skip it: the polish is what people remember.
Second predict puzzle. What does this credits-scroll script do?
when I receive (show-credits v)
go to x: (0) y: (-200)
show
forever
change y by (1)
if <(y position) > (200)> then
hide
stop [this script v]
end
end
Reveal the answer
The sprite teleports to the bottom of the Stage (y: −200), becomes visible, then slowly drifts upward one pixel per frame. When it reaches y > 200 (off the top), it hides and the script stops. That's the entire credits-scrolling pattern — used in literally every movie's end credits since the 1960s, ported to Scratch in four blocks.
The sprite's costume is just a long, thin image with text on it: "Game by Aisha, 2026 · Sounds from freesound.org · Inspired by Super Mario Bros · Thanks to my Year 6 class". A tall PNG and a slow upward drift — that's credits.
New Concept — the three polish sprites 15 min
Polish doesn't change the rules of your game. It changes the frame around the rules. Three new sprites do almost all of it.
Sprite 1 — the title screen
A full-Stage costume that says "PRESS SPACE TO PLAY" with the game's name above it. The sprite covers everything else at the start, then hides on space and broadcasts a "go" signal.
when flag clicked
go to x: (0) y: (0)
go to [front v] layer
show
when [space v] key pressed
hide
broadcast (game-start v)
The rest of your game — the level loader, the player sprite, the score counter — needs to wait for when I receive (game-start v) instead of triggering directly off when ⚑ clicked. That's the one refactor you'll do today on existing sprites.
Sprite 2 — the end screen
A second full-Stage costume that says "YOU WIN!" and shows the player's final score. Hidden at the start. Listens for the victory broadcast from the boss sprite (you sent it last lesson).
when flag clicked
hide
when I receive (victory v)
go to x: (0) y: (0)
go to [front v] layer
show
say (join [Your score: ] (score)) for (3) seconds
say (join [Time: ] (join (play-time) [ seconds])) for (3) seconds
broadcast (show-credits v)
For the time display to work, your project needs a play-time variable that ticks up while the game is running. Add a tiny script anywhere: when I receive (game-start v) → set [play-time v] to (0) → forever → wait (1) seconds → change [play-time v] by (1).
Sprite 3 — the credits scroll
A tall costume — taller than the Stage — with all your credit text painted onto it. The sprite starts below the Stage (y: −200), gets shown when the end screen finishes its messages, and rises one pixel per frame until it's off the top.
when flag clicked
hide
when I receive (show-credits v)
go to x: (0) y: (-200)
go to [front v] layer
show
forever
change y by (1)
if <(y position) > (300)> then
hide
stop [this script v]
end
end
For your costume: switch to the Paint editor, choose Convert to Vector if you want crisp text, and type something like:
PLATFORMER ADVENTURE
~~~
Game by Aisha Rahman
~~~
Code: SCR-L04 cluster D
Sounds from Scratch library
Background art by me
~~~
Thanks to my Year 6 class
Made in Kuala Lumpur, 2026
~~~
THE END
Make it as tall as you like. The taller the image, the longer the credits run.
Putting the three together
The new chain of events looks like this:
- Click flag → title screen shows, everything else waits.
- Press space → title hides, broadcast game-start → player can move, score starts, play-time starts ticking.
- Play, defeat the boss → boss broadcasts victory.
- End screen shows the score and time → broadcasts show-credits.
- Credits scroll up → hide when off-screen → done.
Worked Example — adding all three polish sprites in nine steps 12 min
Open your level-3 + boss project from SCR-L04-22. We'll add all three polish sprites and rewire the game's starting chain.
Step 1 — Paint the title screen sprite
New sprite → Paint. Fill the canvas with a colour. Add big text: the game's name on top, "PRESS SPACE TO PLAY" below. Name the sprite Title.
Step 2 — Wire the title's two scripts
On Title: a flag-click script that shows the sprite and sends it to front; a space-key script that hides it and broadcasts game-start.
Step 3 — Refactor existing scripts to wait for game-start
Find every when ⚑ clicked on your Player, Level Loader, and Score Counter that currently kicks off gameplay. Change those hats to when I receive (game-start v). Keep when ⚑ clicked only for things that happen before the title hides (like the title itself, and any "reset state" scripts).
Step 4 — Add the play-time variable
Variables → Make a Variable → play-time (For all sprites). Pick any sprite — the Title is fine — and add the ticker script: when I receive game-start → set play-time to 0 → forever → wait 1 second → change play-time by 1.
Step 5 — Paint the end screen sprite
New sprite → Paint. Fill the canvas. Add "YOU WIN!" in giant text. Name it EndScreen.
Step 6 — Wire the end screen's three scripts
Hide on flag. On when I receive (victory v): show, go to front, say the score, say the time, broadcast show-credits.
Step 7 — Paint the credits sprite
New sprite → Paint. The costume needs to be tall — at least Stage-height. Type your credits text vertically. Name the sprite Credits.
Step 8 — Wire the credits scroll
Hide on flag. On when I receive (show-credits v): jump to the bottom (y: −200), show, go to front, then a forever that changes y by 1 and hides when y > 300.
Step 9 — Test the whole chain end-to-end
Click the flag. Title appears. Press space. Title hides, game begins, play-time starts counting. Play through to the boss, defeat the boss. End screen says "Your score: ..." and "Time: ... seconds", then credits scroll up from the bottom. Done.
The full assembled stack — Title sprite
when flag clicked
go to x: (0) y: (0)
go to [front v] layer
show
when [space v] key pressed
hide
broadcast (game-start v)
EndScreen sprite
when flag clicked
hide
when I receive (victory v)
go to x: (0) y: (0)
go to [front v] layer
show
say (join [Your score: ] (score)) for (3) seconds
say (join [Time: ] (join (play-time) [ seconds])) for (3) seconds
broadcast (show-credits v)
Credits sprite
when flag clicked
hide
when I receive (show-credits v)
go to x: (0) y: (-200)
go to [front v] layer
show
forever
change y by (1)
if <(y position) > (300)> then
hide
stop [this script v]
end
end
What you just built: the difference between "I made a thing" and "I made a game". Your project now has a clear start, a clear finish, and a name on it. That's the bar for sharing it on the Scratch website.
Try It Yourself — three polish drills 15 min
Goal: Add a game-over screen sprite alongside the win screen. It listens for when I receive (game-over v) (sent by your regular enemies) and shows a "TRY AGAIN" message.
when flag clicked
hide
when I receive (game-over v)
go to x: (0) y: (0)
go to [front v] layer
show
say [Game Over - press space to retry] for (3) seconds
GameOverScreen. Same pattern as the win screen, different broadcast, different message.Think: A game without a clear "you lost" screen is confusing — the player wonders if the game crashed. Pairing every win screen with a matching loss screen is the smallest possible polish that prevents that confusion.
Goal: Make the title screen flash the "PRESS SPACE TO PLAY" text by switching between two costumes — one with the text and one without. Make it switch every half-second so the message pulses, like a real arcade attract screen.
when flag clicked
go to x: (0) y: (0)
go to [front v] layer
show
forever
switch costume to (title-with-text v)
wait (0.5) seconds
switch costume to (title-no-text v)
wait (0.5) seconds
end
when [space v] key pressed
stop [other scripts in sprite v]
hide
broadcast (game-start v)
Think: A pulsing title is a small thing that adds enormous polish. The trick is stop [other scripts in sprite v] — without it, the title sprite would keep switching costumes even after it's hidden.
Goal: Add a high-score persistence system using a Scratch list. When the player wins, push the score onto a list. On the title screen, show the top three scores using item (1) of [high-scores v].
when I receive (victory v)
add (score) to [high-scores v]
when flag clicked
say (join [Best: ] (item (1) of [high-scores v])) for (2) seconds
say (join [2nd: ] (item (2) of [high-scores v])) for (2) seconds
say (join [3rd: ] (item (3) of [high-scores v])) for (2) seconds
Think: Real high-score tables sort the list and trim it to the top 10. That's a few more blocks using delete (item 4) of [list]. For now, just append — and notice how persistence (the list survives between flag-clicks because lists are saved into the .sb3) creates an instant motivation loop: can I beat my own best?
Mini-Challenge — the game that won't start 5 min
"Priya's pre-game player"
Priya added a title screen exactly as the lesson described. She clicked the flag — the title appeared. She pressed space — the title hid. But the player sprite was already walking around behind the title before she pressed space. Here are her two relevant scripts:
when flag clicked
go to x: (0) y: (0)
show
when [space v] key pressed
hide
broadcast (game-start v)
when flag clicked
forever
if <key [right arrow v] pressed?> then
change x by (5)
end
if <key [left arrow v] pressed?> then
change x by (-5)
end
end
Priya checks the title sprite — it's clearly on the front layer, covering the Stage. So why is the player running around behind it?
Reveal one valid solution
Priya's title looks like it covers everything, but the player is still running because the player's control script never waited for the game to start. The title is just a picture sitting on top of an already-running game. The player presses arrow keys, the player moves — the title screen is just visual decoration over a game that's already going.
The fix is the refactor in Step 3 of the worked example: every script that kicks off gameplay needs to listen for when I receive (game-start v) instead of when ⚑ clicked.
when I receive (game-start v)
forever
if <key [right arrow v] pressed?> then
change x by (5)
end
if <key [left arrow v] pressed?> then
change x by (-5)
end
end
One hat block changed. The whole game now correctly waits for the title screen to dismiss. Polish isn't just adding new sprites — it's making sure the old sprites cooperate.
Recap 3 min
You added three sprites that don't change the gameplay but transform how the project feels. A title screen sprite covers the Stage at flag-click and waits for space, then broadcasts game-start so the rest of the game knows to begin. An end screen listens for when I receive (victory v) from your boss, shows "YOU WIN!", and uses join to display the final score and play time. A credits sprite with a tall costume rises one pixel per frame until it scrolls off the top, then hides. Together: a clear start, a clear finish, a name on the work. That's a finished game.
- Title screen
- A full-Stage sprite that appears at when ⚑ clicked and hides on a key press, broadcasting a signal so the rest of the game can begin.
- End screen
- A sprite that appears when the game is won (or lost), displaying the final score and any other end-of-run information. Listens for a broadcast like victory or game-over.
- Credits
- A sprite with a tall text costume that scrolls upward, listing the creator and any borrowed assets. Three blocks: go to bottom, forever change y by 1, hide when off the top.
- join
- join () () from the Operators palette glues two text values together. Used in say (join [Score: ] (score)) to mix labels with variable values.
- Polish
- The non-gameplay finishing touches — start screens, end screens, credits, sounds, transitions — that make the difference between a prototype and a project worth sharing.
- Refactor
- Changing existing code without changing what it does — like swapping every when ⚑ clicked on the player to when I receive (game-start v) so polish sprites can run first.
Homework 2 min
The Polish Pass. Take your boss-fight project from SCR-L04-22 and add all three polish sprites + the play-time variable. Then do the refactor: change every gameplay-starting when ⚑ clicked to when I receive (game-start v).
- Title sprite with your game's name + "PRESS SPACE TO PLAY".
- End screen with "YOU WIN!" + a join showing score, then a second join showing play-time.
- Credits sprite with at least three lines of text, scrolling up.
- play-time variable that ticks up by 1 every second while the game is running (and stops counting after victory — add stop [this script v] in the victory handler).
- The refactor: every gameplay sprite waits for game-start.
Save as HW-L4-23-Polish.sb3. Click the flag. The title should appear. Press space. Play through. Defeat the boss. The end screen should announce your score and time, then the credits should scroll. End-to-end, with no manual key-presses except space at the title.
Bring back next class:
- The
.sb3file. - Your answer to: "Show your project to one person at home who doesn't know Scratch. Write down the first thing they said when the title screen appeared, and the first thing they said when the credits rolled."
Heads up for next class: SCR-L04-24 is the capstone Build for cluster D. You will assemble everything from the previous seven lessons — gravity, jumping, coins, enemies, checkpoints, the boss, and today's polish — into a single complete multi-level platformer ready to share. The biggest lesson in the cluster.