Skip to Content

Scratch 2.0 Video Series - Build a Maze Game

Elementary-friendly 6 part YouTube video series on how to build a maze game using Scratch 2.0 See details for an outline of content covered in the series. Complete Scratch file included too.
Here's the outline I used as I developed each section of the series:
 
Part 1 - Create Backdrops
Stage -> backdrops tab
Rename backdrop "Maze"; backdrop names are case sensitive
Choose backdrop from library
Stage-> Scripts tab
Event-> When flag is clicked
Looks-> Switch Backdrop
Events-> When I receive - message "End Game"
Looks-> Switch Backdrop
 
Part 2 - Choose a Player & a Goal
Delete a sprite - Rclick-> delete
Choose a sprite from library - player
Sprite info -> Name sprite
Sprite Info -> Rotation Style
Resizing sprites
Choose a sprite from library - goal
Sprite info -> Name sprite
 
Part 3 - Touch the Goal, End the Game
Player Sprite->Scripts:
Event-> When flag is clicked
Control -> Forever; If ____ then...
Sensing -> touching: Goal
Event-> Broadcast: "End Game"
Looks -> "Say" block
Control-> Stop all
Test Scripts
Problem: If Player is already touching Goal...
 
 
Part 4 - Make a Player Move with Arrow Keys
Describe how sprites can use X,Y coordinates
Player sprite->scripts
Event-> When "space key" is pressed
 
Control -> Forever; If ____ then...
Sensing-> When "right arrow" pressed
Motion-> Change x by "a postive number"
Motion-> In on edge bounce
Duplicate Script -> RClick
Change "right arrow" to "left arrow"
Change X to "by a negative number"
Duplicate Script
Change "left arrow" to "up arrow"
Replace "change x" block with a "change y" block
Change Y "by a positive number"
Duplicate Script
Change "up arrow" to "down arrow"
Change Y "by a negative number"
 
Part 5 - Put Player and Goal in Place
Place goal sprite in its position
Identify goal sprite's X and Y coordinates
Goal sprite script:
Event-> When flag is clicked
Motion-> Set X ___
Motion-> Set Y ___
Control -> Wait 1 seconds
Looks-> Show
Event-> When I Receive "End Game"
Looks-> Hide
Place player in starting position
Identify player sprite's X and Y coordinates
Player sprite script:
Event-> When flag is clicked
Motion-> Glide .5 seconds to x___, y___
 
Part 6 - Add Obstacles to Maze
Stage-> "Maze" backdrop
Backdrop edit: square: choose solid or outline
ctrl z will undo
Eraser trick: Match shape with background color...
Player sprite script
Event-> When flag clicked
Control -> Forever; If ____ then...
Sensing -> touching color
Motion-> Glide to X__ Y___ (starting coordinates)
Comments
Derek Morton
Member
Nice job. I'm sure my kids will enjoy it.