Lesson / Scratch & Game Design

How Many Times Should the Snowballs Attack?

One snowball is an inconvenience. Fifty copied snowball scripts are a maintenance problem. Put the attack in a loop, control its timing, and give it a reason to stop.

Lesson plan

  1. Find the repeated work

    Mark the snowball actions that would otherwise be copied.

  2. Compare three loops

    Try repeat, forever, and repeat-until with short visible examples.

  3. Build the attack

    Create the fall-and-reset cycle, then add catches, misses, and waves.

  4. Tune the repetition

    Change the delay or stopping condition and test whether the game remains playable.

  5. Explain the loop

    Show what repeats, what changes each time, and what makes it stop.

Learning goals

  • Spot instructions that repeat.
  • Choose between repeat, forever, and repeat-until.
  • Count iterations.
  • Control the pace of a loop.
  • Point to the rule that stops it.

Small examples

repeat 10

run ten waves

forever

keep checking for the life of the game

repeat until score = 8

stop when the goal is reached

wait 0.5 seconds

leave time between iterations

Guided project

Attack of the Angry Snowballs

Move the catcher, survive the changing attack patterns, and keep the town's emergency cocoa out of the snow.

Build This Project
Students build

A controllable catcher, Repeated falling snowballs, Random starting positions, Collision and missed-object rules.

Ideas in use

Loops, Randomness, Coordinates, Collision, Score.

Finish line

A working version with a tested change, one repaired problem, and a clear explanation.

Teacher checkpoints

  1. 1Copied blocks have been replaced by a loop.
  2. 2The student predicts how many times it will run.
  3. 3Something inside the loop changes each time.
  4. 4The game has a clear stop or state rule.
  5. 5The student adjusts the timing independently.

Common mistakes

  • Blocks beneath a forever loop never run.
  • Nothing inside repeat-until can make its condition true.
  • Hazards appear too quickly to play or inspect.
  • Starting values are reset during every wave.

Optional challenges

LEVEL 1

Builder

  • Add a fixed second wave.
LEVEL 2

Inventor

  • Shorten the delay as score rises.
LEVEL 3

Boss Level

  • Create wave states with different patterns.

End-of-class demonstration

  1. What repeats?
  2. How many times?
  3. What changes each time?
  4. What stops the loop?
  5. Which repeated copy did you remove?