- Learnt28 min · a design sheet, a build list, a slice
- Basic24 min · build the slice
- Challenge 1–327 min · fuel, steering, how fast is too fast
- Extrabonus · three pads
Review — one rulebook 5 min
- Two copies of the same code drift apart, one fix at a time.
- One sprite, a clone per player, and its settings read from lists.
- A computer player is a different brain calling the same blocks.
Quick-fire
You have a week and a game in your head. Which do you build first — the title screen, the scoring, or a rocket that falls?
Reveal the answer
The rocket that falls. A title screen for a game that does not exist is a picture. Scoring for a game nobody has played is a guess. The falling rocket is the only one of the three you can show somebody and ask “is this fun yet?”
Today’s Topic 3 min
- The seven-line design sheet every game fits on
- Turning a sheet into a build list, smallest playable thing first
- Movement from a number you keep, not from
glide () secs to x: () y: () - One place that decides what happened: a
touch downMy Block
Learning outcome
By the end of this lesson you will be able to:
- Write a game down on one sheet before opening Scratch.
- Pick the smallest piece of it that somebody could actually play.
- Build that piece and try it on a neighbour.
Learnt — the sheet, the list, the slice 28 min
1 · The design sheet
Seven lines. Every game you have built this year fits on them, and so does the one in your head. Here is the teacher’s, filled in:
| Line | Moon Lander |
|---|---|
| Name | Moon Lander |
| The point | Put the rocket down gently, with fuel to spare. |
| How you win | Touch the pad going slower than 2.2. |
| How you lose | Arrive faster than that, or miss the pad. |
| Sprites | Lander (3 costumes), Landing Pad. Later: Dust. |
| Variables | fall, fuel, state, pad x. Later: a best five list. |
| One tick | gravity → engine → move → have I landed? |
The last line is the one people skip, and it is the one that saves the week. A game is a loop, and if you cannot say what happens in one turn of the loop in four short steps, the game is not designed yet.
2 · The build list — and what a slice is
Now put the sheet in order. Not the order of importance: the order that keeps something playable on the screen at all times.
- The slice — it falls, the engine works, the ground stops it, and it says which happened.
- Fuel, so the engine can run out.
- Side thrusters and a pad that is not underneath you.
- A score, a board, a title screen.
Number 1 is a slice: a thin cut through the whole game rather than one finished corner of it. It is boring, it takes twenty minutes, and it is the only version of your game you will have on Monday. That is exactly why it goes first.
3 · Gravity is one number
A falling thing does not move the same amount each tick — it moves more each tick. So do not move the lander. Keep a number called fall, push it down a little every tick, and add the whole of it to y:
when flag clicked
go to x: (-60) y: (120)
set [fall v] to (0)
set [state v] to [flying]
repeat until <not <(state) = [flying]>>
change [fall v] by (-0.125)
change y by (fall)
if <(y position) < (-102)> then
touch down :: custom
end
end
-102 is where the lander’s feet meet ground whose top is at y = -120.How to use this: Click the green flag and watch the two monitors: fall grows, and the drop gets quicker.
4 · The engine is the same number, the other way
One key, one line. The engine adds 0.375 where gravity took 0.125, so a held burn wins by 0.25 a tick and the lander climbs.
if <key (up arrow v) pressed?> then
change [fall v] by (0.375)
change [fuel v] by (-1)
switch costume to (lander-thrust v)
else
switch costume to (lander v)
end
How to use this: Click the green flag, then hold the up arrow. Let go and watch fall turn negative again.
5 · One place that decides what happened
Every game needs one block that says what just occurred, and only one. Ours is touch down, and it asks two questions in order: am I over the pad? and was I slow enough?
define touch down
set y to (-102)
if <([abs v] of ((x position) - (pad x))) < (34)> then
if <([abs v] of (fall)) < (2.5)> then
set [state v] to [landed]
else
set [state v] to [crashed]
end
else
set [state v] to [missed]
end
state holds the answer, and the loop above stops the moment it stops saying flying.Basic — build the slice 24 min
Your sheet, your game. The steps below are written for the Moon Lander; do them on whatever you planned, changing only the words.
Step 1 — the sheet
- Write your seven lines on paper. Do not open Scratch yet.
- Read the “one tick” line to the person next to you. If it takes longer than ten seconds, cut something.
- Underline the smallest slice — the bit that falls, moves or bounces.
Step 2 — the moving number
- Add the backdrop and the two sprites your slice needs.
- Make
fallandstate, for all sprites. - Build the
repeat untilloop from Learnt part 3 and run it. It should end at the ground, not go through it.
Step 3 — the key and the ending
- Add the engine from part 4 inside the same loop, above
change y by (fall). - Make the
touch downMy Block from part 5. - After the loop, say the state out loud:
say (join (state) [!]).
How to use this: Click the green flag and hold the up arrow to slow your fall. Land under 2.5 and it says landed.
The lander sinks through the ground and keeps going.
The loop is checking (y position) = (-102). It will almost never be exactly that — fall is a decimal. Use <, and put set y to (-102) inside touch down so it sits straight afterwards.
It drops like a stone and there is no time to react.
Your gravity number is too big. −0.125 a tick gives about two seconds of fall from the top of the Stage; −1 gives you a quarter of a second and no game.
The up arrow does nothing.
Either the if is outside the loop — it must be inside, so it is asked every tick — or you put change y by (0.375) instead of change [fall v] by (0.375). The engine changes the number, never the position.
It says “landed” whatever I do.
The speed test is missing, or it reads <(fall) < (2.5)> rather than <([abs v] of (fall)) < (2.5)>. Falling is a negative number, and every negative number is less than 2.5.
A tank that can run out
Right now the engine is free, so the only way to lose is to not press a key. Give it a cost.
- Make
fuel, start it at 120, and show it on the Stage. - The engine may only fire when there is fuel left, and each firing costs one.
- Land with fuel left over.
How to use this: Click the green flag and watch the fuel monitor. The engine holds a slow descent until there is nothing left.
Teacher note
This is the first line of the design sheet arriving in code: “with fuel to spare” was always the point, and until now the game had no opinion about it. Ask the class which line of their own sheet is not in their project yet.
Somewhere to aim
A pad directly below you is not a target. Move it, and give yourself a way across.
- Left and right arrows change
xby 3. - Put the pad somewhere else and start the lander over the rocks.
touch downalready checks the distance — so a miss should now say missed, not landed.
How to use this: Click the green flag. This pilot leans right while it falls; watch how early it has to start.
Teacher reveal — why leaning is not the same as flying
if <key (left arrow v) pressed?> then
change x by (-3)
end
if <key (right arrow v) pressed?> then
change x by (3)
end
Sideways uses change x by (3) directly, with no stored number, because nothing is pulling the lander sideways. Up and down keep a number because gravity never stops. Same game, two different kinds of movement — and the difference is in the design sheet, not in the blocks.
How fast is too fast
Your sheet says 2.5. Prove it is a real rule by landing the same flight twice — once braking, once not.
- Show
fallon the Stage during the flight. - Land gently, write down the number. Land with no engine, write that down too.
- Change 2.5 to a number that makes the game too easy, then to one that makes it impossible.
How to use this: Click the green flag. It flies the same flight twice: the first braking, the second with the engine off.
Teacher note
Tuning a single number is the cheapest way to change how a game feels, and pupils rarely believe that until they do it. Two minutes of changing 2.2 to 1.0 and to 6.0 teaches more about difficulty than a lesson about difficulty would.
Three pads, one target
Put three pads on the moon and let the game choose which one counts tonight — without touching the flight code at all.
- Three Landing Pad sprites at x −150, 0 and 150.
- At the start,
pick random (1) to (3)and setpad xto match. - Say which one it is before the flag drops you.
How to use this: Click the green flag more than once — the pad it asks for changes, and the lander goes to whichever one it is.
Teacher note
Worth saying out loud: nobody added a feature here. The feature was already in the design, sitting in a variable nobody had used yet. That is what planning buys.
Summary 5 min
- Seven lines on paper: name, point, win, lose, sprites, variables, one tick.
- Build the slice first — thin, whole, and playable — not the best bit first.
- Falling is a number you keep, pushed down every tick and added to
y. - One My Block decides what happened, and one variable holds the answer.
- A number in the plan (2.5, 0.125, 120) is a dial you can turn afterwards.
- Design sheet
- The whole game on one page, written before any blocks.
- Slice
- The smallest version that is still playable end to end.
- Tick
- One turn of the game’s main loop.
- Velocity
- A kept number saying how fast and which way something is moving.
Hand in
Save your project and keep the paper. Next week you break this on purpose, and the sheet is how you will know it is broken.