Every game and app you use started as a set of step-by-step instructions written by a programmer — and almost none of them worked perfectly the first time. Programmers test their code, spot what went wrong and fix it. That is called debugging.
Today you are the programmer. We're going to build a game called Banana Jump, where a cat has to leap over falling bananas. Watch the board as each piece is modelled, then build it on your own device and run it to see what happens. When something doesn't work the way you expected — brilliant, that's a bug to hunt down.
Open your own project on the IWB and set the scene: we build together, one piece at a time, and run after each piece. Ask: <em>What do we call it when a program doesn't work and we have to fix it?</em> Set the routine that pupils watch the model first, then copy and run. Remind pupils to work calmly with their partner and share the keyboard fairly.
Welcome to the 'Banana Jump' lesson! In this exciting lesson, you will create a fun game where a cat must jump to avoid falling bananas. You will learn how to use Scratch, a visual programming language, to control character movements, create clones, and detect collisions. By the end of this lesson, you will have your own game that you can play and share with your friends. So, are you ready to start your coding adventure? Let's jump right in!
Read the intro aloud to build excitement and preview the goal: a cat that jumps to avoid bananas. Keep this brief — the energy is in the building. Ask pupils to predict what parts a game like this might need (a character, obstacles, a way to lose).
Start by creating a new Scratch project.
Go to the Scratch website using the link below and click on the 'Create' link in the blue bar at the top.
By default, each new project starts with the cat sprite already added. To delete the cat click on the x in the blue circle beside the cat in the sprite list.
Model creating a new project on the IWB so everyone starts from the same clean point. Watch for pupils who are still on an old project — have them start fresh. Cue support pupils to raise a hand once their blank stage is open.
Add the Blue Sky backdrop from the backdrop library.
The brown part of this backdrop will be the ground in our game.
To add a backdrop from the backdrop library follow these steps:
You can use search box or the filter links (Fantasy, Music, Sports etc) to locate your backdrop.
Show where the backdrop library is and point out the brown strip that will act as the ground — this matters later for where the cat stands. Common slip: choosing a similar-looking backdrop; confirm each pair has the correct one before moving on.
Let's start by positioning the cat down at the bottom left so it appears on the ground. Then we will also make it look like it's running by use a loop (forever block) to change it's costume.
Add the following code to the Sprite1 sprite:
when green flag clicked
go to x: (-142) y: (-110)
forever
next costume
wait (0.2) seconds
end
Model this on the IWB and run the green flag so pupils see the cat appear low-left and 'run' as costumes change. Key bug to watch: the cat floating or off-screen because the coordinates were mistyped — check the numbers together. Ask: <em>What makes the running look continuous?</em> Extension: try a shorter wait and see how the run speed changes.
You're previewing this lesson. Get full access to this lesson and hundreds more — each one ready to teach, with interactive activities, printable resources and pupil progress tracking built in.