Star Student Builder logoStar Student BuilderA Learnerโ€™s Guide
โ† Animation and First Games Std 3โ€“5Project 3 of 4

A Maze to Escape

๐ŸŽฏ Steer a sprite through a maze you drew yourself. Touching a wall sends you back to the start.

๐Ÿ’ก The idea behind it

A program can sense colour โ€” which is how a game knows you hit something without any collision code.

๐Ÿงฑ Blocks you will need

touching colour?go to x: y:foreverif โ€ฆ thenbroadcast

๐Ÿ”จ Build it

  1. Paint a backdrop: draw the maze walls in one single colour, thick enough to see.
  2. Shrink your sprite so it fits the corridors โ€” 'set size to 25%' usually works.
  3. Move it with the four arrow keys, as in the last project.
  4. Add: forever โ†’ if touching colour [the wall colour] โ†’ go to x y of the start.
  5. Draw a green square as the exit, and: if touching colour green โ†’ say 'You escaped!' โ†’ stop all.

๐Ÿš€ Make it harder

  • Add a timer and show how long the escape took.
  • Add a second level by switching the backdrop and moving the sprite back to the start.

๐Ÿž Bugs you will hit

  • It always says you are touching the wall: the colour you picked does not exactly match. Use the eyedropper in the colour picker and click the actual wall.
  • The sprite slips through walls: it is moving more steps per loop than the wall is thick.

โฌ‡ Need Scratch itself?

Free from MIT, in a browser or as an offline app that needs no connection at all.

Get it โ†’
Ask GuruAcharya Samayeshwar