- Learnt28 min · a score, a top five, a front door
- Basic24 min · build the front door
- Challenge 1–327 min · names, a cold test, play again
- Extrabonus · ship it
Review — making it fast 5 min
- The Stage is drawn about thirty times a second, and loops wait for that — or do not.
- Three hundred clones is the whole project’s allowance.
hideis notdelete this clone.
Quick-fire
Your game has a score. Why is one score not enough to make anybody play again?
Reveal the answer
Because there is nothing to beat. A number on its own is a fact. A number beside your five best is a challenge, and it costs one list.
Today’s Topic 3 min
- Turning the design sheet’s “the point” into a score
- A top five with
insert () at () of [best five v]anddelete (6) of [best five v] - A title screen that waits, so the flag never drops you into a falling rocket
- The cold test: ten minutes away, then play it with every script window shut
Learning outcome
By the end of this lesson you will be able to:
- Score a game in a way that matches what the game is about.
- Keep the best five results in order, for ever.
- Test your own game cold, and find the thing it never told you.
Learnt — a reason to play twice 28 min
1 · The score comes off the design sheet
Line two of the sheet said: put the rocket down gently, with fuel to spare. A good score is that sentence as a sum — so a player who does what the game is about gets the big number.
if <(state) = [landed]> then
set [score v] to (round (((fuel) + (bonus)) - (([abs v] of (fall)) * (10))))
else
set [score v] to (0)
end
round keeps a tidy number on the Stage.How to use this: Click the green flag. The pilot brakes gently, and the sentence at the end shows the whole sum.
2 · The best five, in order
A board is a list you put things into, not onto the end of. Walk down until you meet a score smaller than yours, go in above it, and throw the sixth away:
define file the score
set [place v] to (1)
repeat until <<(place) > (length of [best five v])> or <(score) > (item (place) of [best five v])>>
change [place v] by (1)
end
insert (score) at (place) of [best five v]
if <(length of [best five v]) > (5)> then
delete (6) of [best five v]
end
or is what stops it walking off the end of a short list — the search from Lesson 3-11, with an insert at the end of it.How to use this: Click the green flag. Eight scores arrive one at a time; watch the list monitor re-order itself.
3 · A front door
Right now the green flag drops a player straight into a falling rocket. Give the game a screen that waits:
- Say the name of the game and the keys.
wait until <key (space v) pressed?>.- Clear the bubble with
say [], then start the flight.
Basic — build the front door 24 min
Your game, your score. The order below works for any of them.
Step 1 — the score
- Write the sum in words first, on the design sheet.
- Make
scoreand build the sum after the flight loop. - Play twice: once well, once badly. Are the two numbers far enough apart?
Step 2 — the board
- Make the list
best fiveand show it on the Stage. - Build
file the scorefrom Learnt part 2. - Call it after the score — and only when the score is above 0.
Step 3 — the door
- Put the title and the keys in a
saybefore everything else. - Add
wait until <key (space v) pressed?>. - Check the rocket does not move at all until space is pressed.
How to use this: Click the green flag, read the title, press space, then fly with the up arrow and the left and right arrows.
The rocket falls while the title is still up.
The flight loop is in a second script with its own when flag clicked. Two hats mean two things happening at once — put the loop under the wait, in the same script.
My board fills up with zeroes.
Every crash is being filed. Wrap the call: if <(score) > (0)> then.
The board is empty every time I press the flag.
delete all of [best five v] is inside the game. Move it out, or use it only on a reset button you press on purpose.
A new best score goes in at the bottom.
The comparison is the wrong way round, or it is comparing text. Check it reads (score) > (item (place) of [best five v]).
A name on the board
“312” tells you nothing about who. Ask the pilot’s name and put it on the line — without breaking the ordering.
ask [Pilot name?] and waitbefore the flight.- The board shows a line like
Rosa − 312. - The order must still be by score, highest first.
How to use this: Click the green flag. Seven pilots fly one after another; watch the board keep itself in order.
Teacher reveal — why one list is not enough
insert (score) at (place) of [best score v]
insert (join (who) (join [ - ] (score))) at (place) of [best five v]
A line like Rosa − 312 is text, and > on text does not compare the number in it. So the numbers live in their own list and the two are changed together, every time. The alternative — pulling the number back out of the line — is Level 4’s work.
The tester who was told nothing
Everything you know about your game is in your head, and none of it is in the game. Watch what a first flight actually looks like.
- Watch the run below without reading the code first.
- Write down the one thing the player did not know.
- Put that thing into your own game — on the screen, not in your head.
How to use this: Click the green flag and watch when the flame comes on. The sentence at the end says how late that was.
Teacher note
The lesson is not “write instructions”. It is that a designer cannot see their own game. If two pupils swap projects and play in silence for three minutes, both will learn more than an hour of polishing would teach them.
Play again
One flight per green flag is a demonstration, not a game. Make three in a row — and keep the one thing that must survive.
- Put the whole game inside a loop.
- A
new flightMy Block puts back every variable a flight changes. - The board is not one of them.
How to use this: Click the green flag once. Three flights run one after another, and the board monitor keeps all three.
Teacher note
This is Lesson 3-46’s second-go bug, met again on purpose — and the cure is the same one: one My Block holding every reset, so there is one place to look when something is remembered that should not be.
Ship it
Everything from the four weeks, in one project, handed to somebody who has never seen it.
- A title with your name on it, and the keys.
- Three pads, the small one worth double.
- Dust that tidies up after itself, a score, and the best five.
How to use this: Click the green flag, read the title, press space, then fly: up burns, left and right lean. Aim for the small pad on the right.
Summary — and the end of Level 3 5 min
- A score should reward whatever the game is about.
- A board is an insert in the right place, then a delete off the bottom.
- A front door waits for the player.
- A replay resets everything except the records.
- The designer cannot see their own game. Somebody else can.
Level 3 in one table
Twelve arcs, forty-eight lessons. Everything you now know how to do:
| Arc | What it gave you |
|---|---|
| 🥤 Vending Machine | The four operators nested, [floor v] of (), () mod (), pick random () to (), round (). |
| ❓ Quiz Master | Lists: add, item () of [list v], length of [list v], insert, delete, replace. |
| 🃏 Card Battle | Searching a list, sorting one, and item # of () in [list v]. |
| 🎆 Firework Show | My Blocks: define, inputs, and one behaviour written once. |
| 🫧 Bubble Popper | Clones with their own numbers, and the 300 ceiling. |
| ⛈️ Storm Flight | Game state: a title, a game, an ending, lives and a pause. |
| 🧀 Cheese Maze | touching color ()?, walls, goals and guards. |
| 🦘 Jump Quest | Gravity as a kept number, jumping, landing, standing on things. |
| 🗺️ Scroll World | Moving the world instead of the player. |
| 🏰 Tower Defence | Clones, lists, My Blocks and state in one game at last. |
| 🥊 Arena Duel | Two players, one keyboard, one rulebook read from lists. |
| 🚀 Launch Week | Planning, debugging, making it fast, and shipping it. |
- Score
- A number that says how well the point of the game was met.
- Leaderboard
- An ordered list of the best results, kept between goes.
- Playtest
- Watching somebody else play, without helping them.
- Ship
- To finish something and give it to other people.
Hand in
Save and share your finished game, and keep the design sheet with it. That is the end of Level 3 — twelve games, and now one of your own.