Scratch Game
Intermediate
40 mins
Teacher/Student led
130 points
What you need:
Chromebook/Laptop/PC or iPad/Tablet

Shark Tank

In this lesson, students will learn how to create a game in Scratch where a shark tries to catch fish. They will learn how to control the shark using the keyboard, make fish disappear when caught, and use the 'touching' block to detect sprite collisions.
Learning Goals Learning Outcomes Teacher Notes Lesson Files

Live Class Feed

This is a live feed of the latest activity by your students on this lesson. It will update in real-time as they work on the lesson.
Load previous activity

    1 - Introduction

    Welcome to the 'Shark Tank' lesson! In this fun and exciting lesson, you will learn how to create a game where a shark tries to catch sea creatures. You will learn how to control the shark using the arrow keys on your keyboard and make the sea creatures disappear when they are caught by the shark.

    This lesson will teach you how to use the touching block to detect when one sprite collides with another. So, are you ready to dive into the underwater world of coding? Let's get started!


    2 - Create a new project

    Let's start by creating a new Scratch project. First, go to the Scratch website by clicking here.

    Once you're on the Scratch website, click on 'Create' to start a new project. You will see a cat sprite on the screen. We don't need the cat for our game, so let's remove it. 


    3 - Add an underwater backdrop

    Now, let's make our game look like it's under the sea. We will add an underwater backdrop to our game. Click on the 'Choose a Backdrop' button at the bottom-right of the screen. This will open the backdrop library. Scroll down until you find the Underwater 1 backdrop and click on it. You will see that the stage now looks like the bottom of the ocean.


    4 - Add a Fish Sprite

    Now, let's add a fish to our underwater scene. Click on the 'Choose a Sprite' button at the bottom-right of the screen. This will open the sprite library. Scroll down until you find the Fish sprite and click on it. You will see the fish appear on the stage.

    Click and drag the fish to the middle of the stage area.



    5 - Make the Fish Swim

    In this step, we will make the fish swim across the screen. We will also shrink the size of the fish sprite by half to make it look more realistic.

    We will use a block of code that makes the fish move forward. If the fish hits the edge of the screen, it will bounce back and continue swimming in the opposite direction.

    We also add a show block at the beginning. This is important because it ensures that the fish will appear at the start of the game, even if it was previously hidden. Without this block, if the fish was hidden in a previous game, it would stay hidden when you start a new game.

    Here is the code you need to add to the Fish sprite:

    when green flag clicked show set size to [50] % forever move (10) steps if on edge, bounce end
    Once you've added this code, click the green flag to run your project and watch the fish swim!


    Unlock the Full Learning Experience

    Get ready to embark on an incredible learning journey! Get access to this lesson and hundreds more in our Digital Skills Curriculum.

    Copyright Notice
    This lesson is copyright of Coding Ireland. Unauthorised use, copying or distribution is not allowed.

    Scratch is developed by the Lifelong Kindergarten Group at the MIT Media Lab. It is available for free at https://scratch.mit.edu
    🍪 Our website uses cookies to make your browsing experience better. By using our website you agree to our use of cookies. Learn more