What You Will Build
Build an escape-room style puzzle game where players solve logic challenges to unlock the exit. Follow the guide below to build the project, then open the official Raspberry Pi page for starter files, worked examples and extra help.
🍓 This project is on the Raspberry Pi Foundation website. Click the orange button above to access the full guide, starter Scratch project and extension activities on projects.raspberrypi.org.
What You Will Learn
- Build three distinct interactive puzzle mechanics
- Use a solved variable to track overall progress
- Trigger the exit sequence when all puzzles are complete
- Add hints using a question-mark sprite
- Implement a countdown timer for added challenge
Step-by-Step Guide
- 1Create a room backdrop with puzzle elements placed around it.
- 2Add Puzzle 1: a combination lock sprite. Player clicks digit sprites to enter a code. Correct code: broadcast [unlock1].
- 3Add Puzzle 2: a riddle displayed as text. Three answer button sprites — clicking the correct one: broadcast [unlock2].
- 4Add Puzzle 3: a colour sequence. Sprites flash in order — player must click them in the same order. Correct: broadcast [unlock3].
- 5Create a solved variable. Each broadcast increments it by 1.
- 6When solved = 3: play victory sound and animate a door opening.
- 7Add a question-mark sprite. When clicked: show a hint for the next unsolved puzzle.
- 8Add a 120-second countdown timer that ends the game if it hits zero.
- 9Add a reset button that sets solved back to 0 and resets all puzzle states.
- 10Test with a classmate — can they solve all three in under 2 minutes?
Extension Challenges
Finished the main project? Push further:
- Add a fourth meta-puzzle that requires combining clues from the first three.
- Add inventory items scattered around the room that are needed to unlock certain puzzles.
- Create a second room that loads when the first is complete.