Kodeclik Logo

Learn More

Summer 2025

Kodeclik Blog

Catching Game in Scratch: A step by step guide

In this scratch project we will create a catching game with a bowl and a watermelon. The speed of the watermelon will change over time. You will be able to move the bowl left and right to catch these watermelons.

What is Scratch Animation?

Scratch is a great tool to create fun animations. It allows users to develop interactive stories, games, and animations by assembling code blocks, making the process both intuitive and educational. Utilizing a visual interface, Scratch enables aspiring animators to bring characters and scenes to life through simple drag-and-drop commands, fostering creativity and programming skills in a user-friendly environment. With its emphasis on accessibility and creativity, Scratch animation empowers users to explore their imagination while learning fundamental programming concepts.

Step 1: Setup - Log in to Scratch and create a new project

The first thing you'll need to do is open up a new project in the Scratch editor.

Step 2: Get the bowl sprite and watermelon sprite

We'll use two sprites to build a fun catch game. Go to the sprite library and get the bowl sprite, and the watermelon sprite. We'll move the bowl horizontally to catch falling watermelons.

Step 3: Set the bowl’s initial location

At the start of the game, we'll position the bowl at the bottom center of the screen. We choose this position to give the player a good chance at catching the falling watermelons. You can try other start positions to increase the difficulty level of the game.

Step 4: Add movement to the Bowl sprite

Let's program the bowl sprite. The bowl has to move to the left and to the right to catch the falling fruits. Program the left and right arrow keys and add movement using the key pressed and change x blocks.

You can change the speed by increasing the values in the change x blocks. The speed of the bowl can also be used to control the difficulty level of the game.

Step 5: Set the watermelon’s initial position

Let's start programming the watermelon. The watermelons will fall from different positions at the top of the screen. Let's start by placing the watermelon sprite at the top of the screen. If you place it in the center, it will be aligned with the bowl and the player can score points easily.

Step 6: Create multiple watermelons

We'll need multiple watermelons falling from the top. Use the clone block to create multiple watermelons.

The fruits will keep falling continuously until the player loses. So, we'll create clones using the forever block.

Use the wait block to pause between each clone. Pausing longer will make the game easier, so if you want to make the game more difficult, decrease the time in the wait block.

Step 7: Hide the sprite and show the clone

We will add all the code under the when I start as a clone block. This will program each of the new clones that are being created.

If you want to program the original sprite, you'll need to add all the code blocks for the sprite as well.

To avoid building the code twice, we'll hide the sprite and show the clone. If you hide the sprite, the clones will be hidden as well. This is because, you're creating clones of the hidden sprite, the hidden property will also be cloned. So, we'll add a show block to the clone program.

Make sure to change these settings and see what happens, so you'll understand why we are building the code this way.

Step 8: Set the initial position for each clone

The watermelons should fall from the top, but it will be boring to make them all fall from the same position. So, we will make each clone start from a different horizontal position at the top.

Use the pick random block to get a random x position. We'll position each clone at this random x position. Since all the clones will start from the top, we'll use the same y-position as the original sprite.

Step 9: Add movement to each watermelon clone

We've placed each clone in random x positions along the top of the screen. We'll now program the fall movement. In order to make the clones fall straight down, we'll keep the x-position the same and change the y-position.

As each clone moves down vertically, it can either be caught by the bowl or, it can hit the floor. We'll program this along with the score for the game.

Step 10: Create variables for the score and the lives

We'll give the player 3 chances or lives before the game ends. The lives variable will track the player's lives and the score variable will track the game score.

Create 2 variables, score and lives to track the game score and the player lives respectively.

Step 11: Set the initial values for the variables

We will initialize the variables at the start of each game. In the when flag clicked event, set the lives variable to 3 and the score variable to 0.

Step 12: Program the score and lives variables

Let's program the score variable. Whenever the watermelon touches the bowl, the player gets a point. Increase the score variable by 1 and delete the watermelon clone since it has been caught.

If a watermelon clone touches the floor (y-position < -150) it means that the player did not catch this fruit with the bowl. So, we'll decrease the lives variable by 1 and delete the clone.

Finally, we'll continue checking if the lives variable becomes 0 (<1) within the forever loop. Once it does, we'll end the game.

Step 13: Create a speed variable

One of the ways to make the game more interesting is to change the speed of the falling fruits. Let's create a variable to track the speed. This will make the game more fun and you will be able to see the speed changes affect game play.

Step 14: Program the speed variable

At the beginning we should set the speed variable to -5. And put the speed variable in our change y by block. And for every watermelon we can change the speed by -0.2.

Full Video Tutorial : Catching Game in Scratch

Here is a full video tutorial to build your own catching game in Scratch.

Next Steps

Hope you had fun building this animation. We have another exciting Scratch animation project that you can build on your own Planet Animation with Scratch

Want to learn Scratch with us? Sign up for our Scratch Programming online class.

Kodeclik sidebar newsletter

Join our mailing list

Subscribe to get updates about our classes, camps, coupons, and more.

About

Kodeclik is an online coding academy for kids and teens to learn real world programming. Kids are introduced to coding in a fun and exciting way and are challeged to higher levels with engaging, high quality content.

Copyright @ Kodeclik 2025. All rights reserved.