ScratchData LogoScratchData
Back to hammer965's profile

Appearing maze

HAhammer965•Created February 11, 2017
Appearing maze
18
9
950 views
View on Scratch

Instructions

Use the arrow keys to guide the ladybug through the maze,

Description

This project started from an idea. Could I make a maze that appeared as the character walked along it? I came up with a design of a maze that is a grid 5 squares by 10 squares. The edge of each square is either the wall of the maze or the path to walk to the next square. This gave 14 possible different square designs that are different costumes. The costume names are a 4 digit binary number, either a zero or a 1 for the side being a wall or not. I used lists to define the x and y positions that each square would need to be placed. The maze designs are costumes of a sprite and each time a maze is set up a sprite that goes to each side of each square and calculates the binary number for that square and puts it in the list. Once this is done all the maze squares are put in the correct place and hidden to be revealed when the character walks through the maze. This presented a new challenge: how to make the maze appear? I initially made it appear when the character was less than a minimum distance to each maze square sprite. This worked but it wasn’t very realistic as the seeing distance was very small and it made it difficult to navigate the maze. To improve this I made a small sprite (that I called a bullet) that fires out in different directions from the character until it hits the wall of the maze. Along the way any maze pieces that this “bullet” touches are revealed. This is my second Scratch project: By doing this project I learned about lists, clones, stopping at walls without getting stuck or going through (which was not as easy as I thought it would be), use of a binary code to define the maze, the timer (even though I did not end up using the timer in this program), the ghost function, and also the problem you get with too many clones and loops. I hope you like my maze and that maybe it gives you some ideas for one of your own projects. As I learn more about Scratch I will probably find different ways of doing things. If I get any ideas I may come back and try and refine this concept maze and make a version 2. If you have any comments or ideas to help me along then please add them. Visit The Awesome Studios and follow. https://scratch.mit.edu/studios/2051158/ If you have any questions check out the scratch wiki: https://wiki.scratch.mit.edu/wiki/Scratch_Wiki_Home

Project Details

Project ID144776500
CreatedFebruary 11, 2017
Last ModifiedFebruary 2, 2019
SharedFebruary 11, 2017
Visibilityvisible
CommentsAllowed