Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Introduction to Scratch
Go to this website: http://o.ooli.ca/en/scratchgames/cake
Then, choose a
picture that you 2 The picture will probably be
like. Scratch calls too big. To make it smaller,
these pictures 1 click on the Size box and
sprites. enter a smaller number.
3 will
Click on the direction number “90”. You
see a circle with an arrow. Drag the 4 Drag a "move __
steps" block to
arrow until it points upwards and the your program.
direction is 0. Afterwards, click on the Click on it. The bat
block you’ve just created so that the moves a little bit,
bat will now point up. but then it stops.
5 Go to the
"Control" blocks. 6 "move
Drag the
__
Drag a "forever" steps" block
block to your into the
program. The forever
"forever" block will block. What
repeat a happens
command until the when you
game ends. click on it?
1theClickspriteon 2 “Motion”Goblocks.
to the
3 makeWea program
will now
4
to let us use the
keyboard to
move our sprite.
Go to the
"Events" blocks.
Drag a "when
___ key
pressed" block
into your Click the down arrow, and
program. change the key to "right
arrow."
5 6
3 4
Now drag a "if __ Go to the "Sensing" blocks. Drag a "touching __?" block into the "if __ then" block.
then" block into the Scratch will only let you do this if the LEFT side of the "touching __?" block is over the
"forever" block. spot where you want it to go.
Click the
5 down arrow
of the
6
"touching
__?" block.
Choose
"Cake."
7 8 9
Click on the green flag. Move Now add some blocks so that if Also add some blocks so that
your sprite so that it touches you're touching the bat, it will say if you're touching the ghoul, it
the cake. What happens? "oh no!" will say "oh no!"
Page 5
The Ghoul
Let's make a more dangerous monster. Let's program the ghoul to chase you.
1 2
Click on the ghoul sprite. Go to the "Control" blocks. Go to the "Motion" blocks. Drag a "point
Drag a "forever" block and towards ___" block into the forever
put it after the "when green block. Click on the down arrow of the
flag clicked" block. block, and choose your sprite.
4 5
Drag a "move ___ steps" Click on the green flag to start the program.
block and put it inside the The Ghoul will quickly chase your sprite.
forever block. Change the number of steps that the ghoul
moves so that it moves very slowly.
Your Turn
Can you add a sound effect if you get the cake? Can you make an explosion or a whirl effect if you get caught?
Can you add more enemies?