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.
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!
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.
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.
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
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.