Build a basic maze in
Scratch
Prepared by Joy
Suliman for SLQ
Create the hero
Delete the cat
New sprite
Choose a sprite
from the file
Position it on
stage
Resize (shrink/
grow)
Rename ...
Moving your hero
Select hero
When up arrow
key pressed
Point in direction 0
Move 10 steps
Duplicate with
stamp 3 times
Adj...
Create the maze background
Stage /
Backgrounds
New Background:
Paint
Select paint
bucket tool
Choose colour
and fill
Draw the maze
Paint new sprite
Zoom out
Select paint bucket
tool
Select rectangle tool
Draw a few
rectangles with
spaces b...
Resetting the hero
Select hero
When flag clicked
Go to x: y:
Point in direction 90
Forever if
Touching maze
Turn 180 degre...
Create the prizes
Select new sprite
from folder,
position, resize
Rename
Create the code
Duplicate the sprite
with stamp
P...
Create the maze background
Stage /
Backgrounds
New Background:
Paint
Select paint bucket
tool
Choose colour and
fill
Add sound effects
Select hero
Play drum 39 for 0.1
beats
Insert code into reset
loop
Select prize
Play drum 48 for 0.1
bea...
Keeping score
Create a variable
called “score” for all
Select hero
Set score to 0
Select prize
Change score by 1
Simple you win
Select hero
When flag clicked
Forever
If
Score
= 3
Say winner!!
Want to add more levels?
We'll need to create a new set of variables
and put them into action
So watch carefully . . .
  Remove the
“winner” script
from the shark
  Create a variable
“level”
  Add this code to
the script for the
stage
  ...
Changing the maze
  Create a new
costume for the maze
called maze 2
  Create a new
costume for the maze
with a win messa...
New prizes for the new level
  Draw or import a new
prize sprite
  Create a new
costume for the maze
with a win message
...
A bit of tidying up . . .
  Select the hero
  Add these two bits of
code
Pimp and personalise your
game . . .
  Animate the
hero or prizes
  Add more
levels, see if
you can
make then
harder
  ...
Want more?
  Go to the scratch website
www.scratch.mit.edu
  Have a look around, find something you like,
check out the ...
Upcoming SlideShare
Loading in...5
×

Build a basic maze in scratch (v1)

6,134
-1

Published on

This is a step by step tutorial for a maze game in scratch which has a hero controlled with the arrow keys, maze, levels, win and lose scenarios.

Published in: Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
6,134
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
67
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Build a basic maze in scratch (v1)

  1. 1. Build a basic maze in Scratch Prepared by Joy Suliman for SLQ
  2. 2. Create the hero Delete the cat New sprite Choose a sprite from the file Position it on stage Resize (shrink/ grow) Rename it hero
  3. 3. Moving your hero Select hero When up arrow key pressed Point in direction 0 Move 10 steps Duplicate with stamp 3 times Adjust values for all directions
  4. 4. Create the maze background Stage / Backgrounds New Background: Paint Select paint bucket tool Choose colour and fill
  5. 5. Draw the maze Paint new sprite Zoom out Select paint bucket tool Select rectangle tool Draw a few rectangles with spaces between Rename sprite to maze Rename costume to maze1
  6. 6. Resetting the hero Select hero When flag clicked Go to x: y: Point in direction 90 Forever if Touching maze Turn 180 degrees Move 20 steps
  7. 7. Create the prizes Select new sprite from folder, position, resize Rename Create the code Duplicate the sprite with stamp Position, resize, rename new sprites
  8. 8. Create the maze background Stage / Backgrounds New Background: Paint Select paint bucket tool Choose colour and fill
  9. 9. Add sound effects Select hero Play drum 39 for 0.1 beats Insert code into reset loop Select prize Play drum 48 for 0.1 beats Insert code, repeat for each prize
  10. 10. Keeping score Create a variable called “score” for all Select hero Set score to 0 Select prize Change score by 1
  11. 11. Simple you win Select hero When flag clicked Forever If Score = 3 Say winner!!
  12. 12. Want to add more levels? We'll need to create a new set of variables and put them into action So watch carefully . . .
  13. 13.   Remove the “winner” script from the shark   Create a variable “level”   Add this code to the script for the stage   It works by setting the level to the score Setting up the levels
  14. 14. Changing the maze   Create a new costume for the maze called maze 2   Create a new costume for the maze with a win message called end screen   Include this code in the maze scripts
  15. 15. New prizes for the new level   Draw or import a new prize sprite   Create a new costume for the maze with a win message called end screen   Include this code in the maze scripts
  16. 16. A bit of tidying up . . .   Select the hero   Add these two bits of code
  17. 17. Pimp and personalise your game . . .   Animate the hero or prizes   Add more levels, see if you can make then harder   Set a timer for each level   Use the pen scripts so that you hero leaves a trail   Create instructions, a start screen and story   Add or create soundtrack for your game
  18. 18. Want more?   Go to the scratch website www.scratch.mit.edu   Have a look around, find something you like, check out the code, and see if you can modify it to use in your game.
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×