SCR ATCH
Create multi-level Scratch games
Les Pounder creates multi-level games with Scratch 3. He also needs to defeat hostile, hungry space hippos before they consume the Earth!
OUR EXPERT
Les Pounder is associate editor at Tom’s Hardware and a freelance maker for hire. He blogs about his projects and adventures at
bigl.es.
YOU NEED
Raspberry Pi 3/4/400 The latest Raspberry Pi OS Get the code here: https:// scratch.mit. edu/ projects/ 588488388
T he evil space bats have formed an alliance with the cruel space hippos and we need to blast them back to their home world! Okay, in reality this is a simple space shooting game with a twist. It has two levels of fun and scores that vary depending on the level. So let’s save planet Earth!
Scratch 3 should come pre-installed on your Raspberry Pi OS image, but just in case it is missing you can be installed from the main menu, under Preferences>Recommended Software. Scratch 3 is found in the Programming category – place a tick in the box and click Apply to install. Once installed, Scratch 3 can be found in the main menu under Programming.
Open Scratch 3 (on first start Scratch may take a little while to open). We’re going to assume that you have an understanding of how to code with Scratch. If not, we covered the basics in previous issues.
Stay on target
We start the game by deleting the cat sprite, then hover the mouse on the blue cat icon in the bottom right of the screen and select Paint. We need to draw a new sprite using Scratch 3’s vector graphics editor. Specifically, we’re after a crosshair to tell us where to fire. This is a simple circle with lines drawn from top to bottom, and left to right. Position the centre of the crosshair slightly off the centre of the page, otherwise our crosshair will get in the way of our shots.