Public lesson / Scratch & Game Design

What Is the Bug Trying to Tell You?

The game works unless the player wins while being caught near the right edge. Random repairs make it stranger. Can we reproduce the bug and make one useful test?

Lesson rhythm

The idea moves toward a demonstration.

  1. Story, problem, or provocation

    Name the problem before opening the build.

  2. Theory and concept

    Make the hidden rule visible with small tests.

  3. Guided build

    Use the idea inside a working project system.

  4. Modification challenge

    Change one rule and predict the effect.

  5. Demonstration and cleanup

    Explain the result, save safely, and leave a known state.

Learning goals

What students should be able to do and explain.

  • Separate expected and observed results.
  • Reproduce a bug.
  • Inspect visible values or state.
  • Form one hypothesis.
  • Run a controlled test and explain the evidence.

Theory kernel

Small examples before the larger build.

show x position

inspect movement evidence

say game_state

reveal hidden mode

disable one script

reduce the system

repeat the same inputs

test reproducibility

Guided-build preview

Escape from the Giant Pigeon

Reach a safe place while a huge, unreasonable pigeon chases you across the map. The game should be funny to play and precise enough to explain.

Open Guided Project
Students build

Keyboard movement in four directions, Known starting positions, A pursuing pigeon, One or more safe areas.

Concepts in use

Coordinates, Movement, Conditions, Collision, Game State.

Finish line

A working version, one modification, one repaired problem, and an explanation.

Teacher checkpoints

Evidence before adding complexity.

  1. 1Student describes the bug without guessing.
  2. 2A repeatable sequence triggers it.
  3. 3One relevant value is inspected.
  4. 4One hypothesis is tested at a time.
  5. 5The repair is explained with evidence.

Common mistakes

Pause, inspect, and test one cause.

  • Changing several scripts at once.
  • Testing only the successful path.
  • Adding delays to hide a state problem.
  • Stopping after the symptom disappears once.

Modification challenge

Three levels, one concept kept visible.

Higher levels are optional. They deepen the current idea rather than turning a beginner lesson into an unrelated advanced task.

LEVEL 1

Builder

  • Create a bug report with exact steps.
LEVEL 2

Inventor

  • Add temporary on-screen state monitors.
LEVEL 3

Boss Level

  • Design an automated edge-case test sequence.

End-of-class demonstration

Explain the work while it is still visible.

  1. What should happen?
  2. What actually happens?
  3. How can you reproduce it?
  4. What evidence did you inspect?
  5. Why did the fix work?