- Learnt27 min · a row of targets, breaking them, and the cost
- Basic25 min · build the wall
- Challenge 1–327 min · your wall, uneven prizes, a hard last target
- Extrabonus · a target that takes two hits
Review — where we got to 5 min
The game can be lost, and the score counts bounces. Now the bounces get a purpose.
- The floor takes a life; the serve puts the ball back downward.
- Clones:
create clone of [myself v]andwhen I start as a clone, from Jump Dash.
Quick-fire
Six targets in a row. How many sprites is that?
Reveal the answer
One. Six clones of one sprite, made by a loop. Dragging six copies works too, and you have to edit all six every time you change your mind.
Today’s Topic 3 min
- Building a row of clones with a repeat and a change x
- A clone that waits to be hit, then removes itself
- Why the ball and the target each mind their own business
- A game that gets harder every time you succeed
Learning outcome
By the end of this lesson you will be able to:
- Lay out a row of clones with one loop.
- Make a clone disappear when the ball reaches it, and pay for it.
- Raise the difficulty as the player wins, without touching the ball’s loop.
Learnt — a row, a break, and a cost 27 min
1 · A row that builds itself
Six targets, evenly spaced, from one sprite. The loop makes a clone, steps sideways, and does it again.
- Add the Crystal sprite. Set its size to
80. - On the flag:
hide, thengo to x: (-175) y: (130). - Add
repeat (6). - Inside it:
create clone of [myself v]thenchange x by (70). - Give the clone stack one job for now:
show. - Press the flag and count them.
when flag clicked
hide
set size to (80) %
go to x: (-175) y: (130)
repeat (6)
create clone of [myself v]
change x by (70)
end
How to use this: Click the green flag and count the crystals. Six clones, laid out by one loop — nothing to press.
2 · Breaking one
The target waits to be touched, pays out, and deletes itself. The ball never knows which one it hit, and does not need to.
- In the clone stack, after
show, addwait until <touching [Ball v]?>. - Then a sound, ten points, and a delete.
- On the ball, inside its loop, add
if <touching [Crystal v]?> then. - Inside that:
point in direction (pick random (135) to (225))andmove (12) steps. - Play. Break all six.
when I start as a clone
show
wait until <touching [Ball v]?>
start sound [Glass Breaking v]
change [score v] by (10)
delete this clone
How to use this: Click the green flag, click the stage once, then hold ← or → to aim the ball upward and clear the row.
3 · Harder every time you win
A row that gets easier as it empties is a game that ends in a shrug. Every break should cost you something.
- Make a variable called
speedand set it to6on the flag. - Put it in the ball’s
move ( ) steps. - On the target’s clone stack, before the delete, add
change [speed v] by (0.5). - Add a second line there:
broadcast [shrink v]. - On the paddle, receive it and
change size by (-6). - Play a whole row and feel the last two.
when I receive [shrink v]
change size by (-6)
How to use this: Click the green flag, click the stage once, then hold ← or →. Watch the paddle shrink and the speed climb every time a crystal breaks.
Basic — build the wall 25 min
Open last week’s game. Build the row before you touch the ball.
Step 1 — the row
- Add the target sprite and hide the original.
- Build the repeat that lays out the clones.
- Count them on screen. Six, evenly spaced, all on the Stage.
Step 2 — breaking
- Add the wait-until and the payout to the clone stack.
- Play and walk the ball into a target by hand.
- Check the score goes up by exactly ten.
Step 3 — the bounce
- Add the touching question to the ball.
- Send it back downward and move it clear.
- Check it never breaks two targets in one pass by accident.
Step 4 — the cost
- Put the speed variable in the ball’s move block.
- Raise it on every break.
- Add the shrink broadcast and the paddle’s reply.
Step 5 — reset properly
- On the flag, set the paddle back to
100% and the speed back to 6. - Play three games in a row and check the second starts like the first.
The paddle stays tiny in the next game.
set size to (100) % is missing from the paddle’s flag stack. Change size never undoes itself.
All six targets vanish at once.
The wait-until is on the flag stack rather than the clone stack, so the original answered for everybody.
The ball goes straight through the targets.
The ball has no touching question of its own. The target deleting itself is not a bounce.
The ball gets stuck in the row.
The move after the bounce is too small to clear the next crystal. Twelve is usually enough; check the spacing.
Your own wall
One straight row is the simplest possible shape. Build a better one.
- A shape that is not a single straight line.
- Every target is reachable by a ball off the paddle.
- None of them sit half off the Stage.
Not every target is worth ten
A target in the middle is a gift. One tucked into a corner is a skill. Pay for them differently.
- At least two kinds of target, told apart at a glance.
- The harder one pays more.
- A player can work out which is which without being told.
Teacher note — colour is the cheapest signal
The Crystal sprite has two costumes, and a different costume on the corner clones says “different” without a word of text. Pupils reach for labels first; nudge them towards colour and size.
Winnable, but only just
Tune your game so that clearing the whole wall is possible and rare. That is one number at a time, and a lot of playing.
- You have cleared the wall at least once.
- You have failed to clear it at least three times.
- You can name the numbers you changed and what each one did.
Teacher note — three dials, one at a time
Speed, shrink and the number of targets are the three dials. A pupil who moves all three at once will spend the lesson going in circles. Write the three numbers on the board and change one per playtest.
A target that takes two hits
The first hit cracks it. The second breaks it. The interesting part is how a clone remembers which hit it is on.
How to use this: Click the green flag, click the stage once, then hold ← or →. Every crystal cracks on the first hit and breaks on the second.
- The first hit changes how the target looks and pays nothing.
- The second hit breaks it and pays double.
- One pass of the ball can never count as two hits.
- Each clone remembers its own state — hitting one does not crack the others.
Teacher notes — where a clone keeps its memory
Level 1 has no variable that belongs to one clone, so the clone’s own place in its script is the memory. Two waits in a row do it: wait to be touched, change costume, then wait to be touched again. A clone sitting at the second wait has been hit once, and nothing had to remember that on its behalf.
The line between them is the one pupils miss: wait until <not <touching [Ball v]?>>. Without it the ball is still touching on the next frame and the target breaks in the same pass.
Going further: next lesson the wall comes back a second time, harder, and the game gets a front door of its own.
Summary 4 min
The rally has a point now, and every point makes the next one harder.
- A repeat with a change x in it lays out a whole row of clones.
- A clone waits to be touched, pays out, and deletes itself.
- The ball asks about the sprite, not about one clone.
- Difficulty that rises when the player wins keeps a game honest.
- Target
- A clone that waits to be hit, pays points, and removes itself.
- Row
- Clones laid out by a loop rather than dragged into place.
- wait until
- Stops a script dead until something becomes true.
- Difficulty curve
- How much harder a game gets as the player does well.
Next lesson: a second wall, a win screen, and a front door for the whole game.