Scratch Arcade Games

Nerdsville Factsheet No 6
Scratch Arcade Games
Have a look at the sample game Evil Daddy from
Nerdsville’s Scratch project page here…
http://scratch.mit.edu/users/Nerdsville
Download the project and open it in Scratch on your
computer so you can look at the scripts.
The little boy in the game has to sneak downstairs
past evil daddy (the yellow dude) and get to the red
remote control to turn on the TV and avoid being told
to do his homework. Use the left and right arrow keys
to move.
Boy’s scripts: Boy’s main script allows you to control
his movement. I used the
command to sense when the boy touches the floor,
daddy or the remote control (each time you use this
command you choose the specific colour that
activates it). The broadcast command is used to
create branches when these things happen.
Variables are x and y are used to control Boy’s
horizontal and vertical position. To simulate gravity
and make him sink until he touches the floor we
change the boy’s y position by -1 in each loop unless
he is touching green – can you see how this works?
The remote control and TV picture sprites have their
own small scripts – can you see what these do?
Make your own game
Use this project to create a new arcade game or
create your own from scratch!
Check out this great Scratch version of PacMan…
http://scratch.mit.edu/projects/aoliver2/2345919
How it works…
I made the stage on a photo editing program – the
most important bits are the green borders. The scripts
include commands that tell the sprites to bounce off
green walls (Evil daddy) and not to sink through the
green floor (Boy).
Evil daddy’s scripts: Evil daddy’s main script simply
tells him to randomly turn and move around the
screen. This loop tells him to bounce off when he hits
a green border…
Evil daddy’s scripts window also contains little scripts
that control the sounds in the game and one that
stops the game if the boy loses all three lives.