Public lesson / Scratch & Game Design

How Does the Game Know You Touched the Lava?

The floor looks extremely lava-like, but the computer does not care about appearances. What exactly counts as touching danger, and how often should the game check?

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.

  • Identify a sensing signal.
  • Define a collision or boundary.
  • Check a changing signal repeatedly.
  • Prevent repeated scoring from one contact.
  • Inspect collision evidence while debugging.

Theory kernel

Small examples before the larger build.

touching Lava?

test sprite contact

touching colour red?

test a map region

distance to hazard < 40

test nearness

if touching then set state

turn sensing into behaviour

Guided-build preview

The Floor Is Definitely Lava

Cross a room whose floor has become lava for reasons the building manager refuses to explain.

Open Guided Project
Students build

Horizontal movement, A controlled jump, Safe platforms, Lava collision.

Concepts in use

Sensing, Collision, Coordinates, Variables, Game State.

Finish line

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

Teacher checkpoints

Evidence before adding complexity.

  1. 1Student can show the collision area.
  2. 2Sensing is checked while movement occurs.
  3. 3One contact causes one state change.
  4. 4Restart clears the collision state.
  5. 5Student tests a fast boundary crossing.

Common mistakes

Pause, inspect, and test one cause.

  • Costume transparency makes the hitbox surprising.
  • Contact is checked only at startup.
  • Score rises every frame during one collision.
  • A visual overlap is assumed without reading the sensing result.

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

  • Add one safe platform.
LEVEL 2

Inventor

  • Make platforms move while preserving collision.
LEVEL 3

Boss Level

  • Create one-way or temporary safe surfaces.

End-of-class demonstration

Explain the work while it is still visible.

  1. What signal counts as contact?
  2. How often is it checked?
  3. What state changes?
  4. How did you test the boundary?
  5. What collision bug did you fix?