
Code Your Own Octopus Chase Game in Scratch
In this fun project, you’ll learn how to program a game where an octopus chases and catches a fish!
Let’s get started…
1. Visit the Scratch website.
2. If you already have a Scratch account, click ‘Sign in’ and enter your login details, otherwise click ‘Join Scratch’ and create your free Scratch account.
3. Once you’re logged in, open a new project by clicking the ‘Create’ button at the top of the screen.
Let’s get coding…
4. First we need to delete the cat Sprite and then add in an Octopus and a Fish Sprite into our project (you can pick other Sprites if you want to)!
5. Next, we want to add in an underwater background to our project, to make it look more realistic.
6. We want to code our game so that when we press the green flag, and start the game, that the Octopus Sprite always follows our mouse pointer - so we can control it at all times!
TIP: the ‘go to mouse-pointer’ block will appear in motion as ‘go to random-position’, you need to click ‘random-position’ to access a drop down menu, then select ‘mouse-pointer from the list.
7. Now we want to add some similar code to our Fish Sprite. However, we want our Fish Sprite to ‘glide 1 secs to random-position’, so it looks like it is swimming around!
8. Test your project out by pressing the Green Flag. Your Octopus should follow your mouse around the screen, and your Fish should swim around on its own.
9. Now we want to code our Fish Sprite to disappear if our Octopus catches it. It should also reappear in a new costume, and in a new location in our game. Add the below code to the Fish Sprite.
9. All done! Let’s save your project. Click the ‘File’ menu at the top of the screen and then click ‘Save now’.
Share it…
10. Now it’s time to share your creation. Click the orange ‘Share’ button at the top of the screen.
The ‘Share’ button will only be visible if you have verified your email with Scratch. If you can’t see the button, click on your profile name in the top right corner, select ‘Profile’ and follow the instructions in the orange banner at the top of the screen to verify your email.
11. Click the ‘Copy Link’ button.
You can share that link with friends and family by email or text message and they’ll be able to play your awesome Ocotpus game.