Wikijunior:Raspberry Pi/Scratch Game – Simple Maze

Tutorial by Andrew Oakley Public Domain Updated Nov 2017 www.cotswoldjam.org

Getting started


1. Click on the Raspberry menu, Programming, Scratch.

2. Click the Maximise Window button.

3. Select File menu, Open.

4. Click the Pi button.

5. Select Scratch and click OK.

6. Select simple-maze and click OK.

7. Select smaze1 and click OK. A green and blue maze should appear.







You should now be able to move the Smiley left and right, using the left and right  arrow keys.

is a "variable". A variable can hold a number or a word which can change. measures the left and right positions.



You should now be able to move the Smiley up and down, using the up and down  arrow keys. The  variable measures up and down position.

The Smiley can now move anywhere around the maze, including through the walls.

We need to add rules

 * To make the Smiley go back to the start if it hits a blue wall
 * To say "You win!" if the Smiley reaches the white outline of the exit

Create this new block



To select a colour
1. Click the colour box.

2. Click the colour you need.

To start a new game
Click the green flag.

What if you make a mistake?
Right-click any block and click "delete".

For teachers / Scout / Guide leaders
Downloads available from http://www.cotswoldjam.org/downloads/beavers

To add the files to Raspbian, go to the Terminal:

Note that  is the capital letter O, not zero.

cjam-scratch-simple-maze.pdf
The original PDF for this tutorial is on Wikimedia Commons: