How to Make Maze Game in Scratch (Step by Step Scratch 3.0 Tutorial)

About Maze Game:

How to Create Maze Game on Scratch

Maze Game in Scratch, you will create a game that lets the player guide a cat through a maze to reach its goal—a delicious apple! You’ll learn how to move the cat with the keyboard and how to block its progress with walls.

Choose a sprite to move through a maze. It must fit inside your maze.

Position the Cat Sprite on your screen at the beginning of the maze. Get the values for the x and y coordinates of the Sprite at the beginning of the maze. Set your script to this value.

Easy Maze Game on Scratch Tutorial

Make the cat walk around using arrow keys

When the right arrow key is pressed we can point the Sprite in a certain direction and move ten steps. 

Program your sprite to move in the corresponding direction (left, up, and down) when the arrow keys on the keyboard are pressed

Keep the cat from walking through walls

The problem at the moment is that you can walk through walls. You need to stop when the Maze wall is touched. 

We need to program that, If it is touching a wall, we want it to say “Ahhh” for a period of time, then it goes backwards which makes it look like it has bounced off the wall.

This sensing block tests to see if our Giga sprite is touching any black lines, using the touching colour sensor and if this test is true, then we take back the previous steps. This will stop Giga from crossing the black line.

Add sounds when it hits the maze and when it finishes.

Add a timer and show the time it took to complete the maze once it is successfully completed.

Make a Goal at the end of a Maze

Let’s add an apple at the other end of the maze to make the player’s goal more obvious.

Choose Apple sprite from library and Resize the apple to fit the maze. Now it just needs the code to detect when the player reaches the end. When that happens, you’ll have Scratch play a sound and then swap costumes to the next level. 

Maze Scratch game Code

Maze Scratch Game Tutorial
Maze game on Scratch 3.0

Download Project Files:

To download the project files of the project How to Make Maze Game in Scratch Click here. Also go through the another interesting scratch 3.0 project of Animate Your Name using scratch 3.0 here,

5 thoughts on “How to Make Maze Game in Scratch (Step by Step Scratch 3.0 Tutorial)”

  1. Having read this I thought it was really informative. I appreciate you finding the time and energy to put this information together. I once again find myself personally spending way too much time both reading and leaving comments. But so what, it was still worth it!

  2. I’m impressed, I must say. Rarely do I come across a blog that’s both educative and amusing, and without a doubt, you’ve hit the nail on the head. The problem is something too few folks are speaking intelligently about. I am very happy that I stumbled across this in my hunt for something relating to this.


Leave a Comment