Topic Guide

Sensing and Collision

Sensing blocks report contact, colour, distance, button presses, and other changes a program can use.

Why this matters

A moving sprite needs to notice walls, hazards, and targets. A robot needs a reading from outside its command list before it can respond to a box placed in its path.

Beyond this topic

A door sensor may use a physical switch; a game uses the shapes of two costumes. In both cases, the designer has to define exactly what counts as contact.

Math and logic

Signal

Information the program can read.

Collision

Two defined areas touch or overlap.

Boundary

A position or region where the rules change.

Continuous checking

A loop reads changing input again and again.

Small examples

1

Touching colour

Use a map colour to mark a wall or hazard.

2

Sprite collision

Check whether the player and target overlap.

3

Distance reading

Respond when an obstacle is nearer than a set limit.

4

Button sensing

Read whether a physical control is pressed.

Program connections

Where this topic appears.

Active now

Scratch & Game Design

Students author games, animations, simulations, and strange interactive stories while learning how events, rules, and state fit together.

Active now

Robotics

Students write commands, wire simple circuits, read sensors, and trace physical cause and effect through the Sense–Decide–Act loop.

Coming later

Roblox Studio / Lua

A possible later step from visual programming into Lua, 3D objects, events, and larger game rules.

Common mistakes

Surprising collision area

A costume is larger than it looks, so contact happens too early.

One-time check

The player moves after the collision test has already finished.

Repeated scoring

One long contact adds a point on every trip through the loop.

Trusting the picture

The sprites look close, but the sensing block reports something else.

Put the idea to work

Read the Lesson
Scratch & Game Design Guided Project

The Floor Is Definitely Lava

Build a one-room platform game with a controlled jump, safe platforms, lava, and a clean restart.

  • Sensing
  • Collision
  • Coordinates
  • Variables
See how it works
Scratch & Game Design Computer Lab Project

Astro-Chicken Rescue

Track several drifting chickens, collect them once each, and stay out of the danger zones.

  • Coordinates
  • Movement
  • Random Positions
  • Sensing
See how it works
Robotics Guided Project

Button and Buzzer Alarm

Connect a button to a visible and audible alarm, then write clear rules for arming, triggering, and resetting it.

  • Input
  • Output
  • Events
  • Conditions
See how it works