We're celebrating a birthday, so let’s throw birthday cakes at a robot! You’re either going to need Scratch 3 installed on your computer, or you can use Scratch 3 online at scratch.mit.edu.
You can play a version of this game at dojo.soy/birthdayscratch to see how it works.
Everything you need to create this game is in the Scratch sprite library, apart from the CoderDojo logo, which you can download from dojo.soy/birthdaylogo. If you want your game to play notes for a birthday song, you need to add the music extension in Scratch.
Here’s the code for your sprites:
Now you can add some more stuff: make your game check for a particular score and tell the player they’ve won when they reach this score.
To do that, you need to create a new ‘You win!’ sprite using Scratch's editing tools.
Then you need to add to and change some bits of your code:
Change your game so that you score points when you don’t hit the robot. Or, make your game play Happy Birthday, like the version of the game you tried out. You decide!