Professional Documents
Culture Documents
and Control
Creating a Scratch Packman
Year 8 ICT
What you will learn:
• To design a maze background
• To resize a sprite
• To move a sprite under keyboard control
• Stop the sprite moving over the background
• To get ‘prizes’ to disappear
• To score with the prizes
• To get the prize to appear again unexpectedly
• To choose your own prizes
• To randomly alter the grid.
Stage 1 of Packman
Maze
Score
‘Prize’ Explorer
Stage 2 of Packman
Explorer
moves
Stage 3 of Packman
Score
goes up
Explorer
grabs
prize
Stage 4 of Packman
Explorer
moves on
Stage 5 of Packman
‘Prize’
reappears
What you need to decide
• To decide on a maze background grid.
• To decide on the sprite as the explorer.
• To plan the ‘prizes’ – the sprites and the points
for each.
• To plan for how long a prize would disappear.
• To decide if the background will change to a new
level or will the grid alter randomly.
Design a background
• The background must
have one colour that
the sprite cannot
cross (blue in the
example.)
• The passage ways
must be broad
enough to take the
sprite.
Replace the Cat
1. Delete the cat sprite.
2. Choose a new sprite
– use the central
button under the
stage. I called it the
explorer.
3. Resize the sprite to
make it small
enough to follow the
passages.
Step 1
Step 2 Step 3
Get the Sprite to Move
• Use the starting code
as below – make sure
all directions work.
Keep the Sprite on Track
• Stop the sprite moving over the
background by …
• … checking if it has moved too far.
• If so, move back 5
Add a “Prize”
• Add a “prize” – a banana.
• Place it in a passageway.
• There should be a forever
loop
• The script should hide the
banana if it is touching the
explorer.
• Remember to save your
Scratch program.
Score Grabbing a Prize
• There are 2 parts
• A variable to store the score