- First, you’ll need a maze. You can use your own or download this:
To make things simple, make sure that whichever maze you use, it has no openings. This is how we avoid player form coming out of the maze and just bypass it from outside.
2. Download your maze of choice as a backdrop:
3. Delete the cat
4. Pick new sprite (character)
Double click the one you want. In this example, I choose Ladybug1.
5. Edit sprite’s costume
6. Draw a box around your sprite with mouse. (Click and drag the box over to opposite corner.)
Now, click on one corner and drag the sprite smaller. Good size with this maze is somewhere around 20×20, I use in this example 18×19. You can check the size here:
It’s not a problem if it’s not perfect square, for example 17×19. Just make sure that both numbers are small enough for your sprite to walk in the maze without touching the walls.
Now the code:
Make sure that your starting coordinates are right.
To get the touching color right, first click the box that has the color in it, then click at black part of the labyrinth.
This is now very basic, we could add some goal to the end:
There are several ways you can make this game better if you want to. Here are some ideas:
- Time to complete the labyrinth
- Some collectables
- Player moving all the time, only the speed is altered when player uses keyboard
- More levels