How to make an educational Snakes and Ladders game in Scratch

advertisement
How to make an educational Snakes
and Ladders game in Scratch
Features:
• Player’s sprite moves through the circular fields
depending on the value of the dice “thrown”
• The current circle “lights up”
• One “snake” drops the player a few positions back
when the player hits a certain circle
• One “ladder” takes the player up a few positions when
at a certain circle
• Educational questions at certain positions, otherwise,
won’t let to continue
• Have to “throw” a certain number to hit the Finish
circle
All the sprites at a glance
Notes:
•The Cat has the longest scripts
•All Number Circles have the same
code, so could just duplicate the
first one many times over
•The Snake is still called Ladder2,
because it’s just Ladder1 duplicated
and changed...
•Finish and Start have no other
costumes or code
The list of variables
Notice the option for the list
in Scratch 1.4 but we are not
using it in this example
(although, you could create
much shorter code with
lists)
The number circles – costumes, so that
it “lights up” when hit
The code for a number circle
Sprite 1 is the cat, when the
cat touches this circle, it
lights up
Costumes for the “dice”
Different costumes will
come up depending on the
value of the dice thrown
The code for the dice
Dice value is a random
number between 1 and 3,
once the dice is throws, it
broadcasts a signal to move
that many steps to the cat
The Cat – only
one costume and
lots of code...
Many lines in this code are
very similar to each other,
for example, many if
statements – you can rightclick and duplicate them and
then modify their values
At position 6, the
educational question is
asked
continued
End of the long script
The Cat’s second script, handles snakes
and ladders
The last 2 scripts for the Cat, handle
the beginning of the program
Play again sprite
Yes sprite (response to Play again)
“No” sprite
The End
• Extension:
• Add more circles (copy and paste will really
help)
• Add more snakes and ladders
• Add more questions
• Add more players
Download