Scratch Game
Intermediate
30 mins
Teacher/Student led
+165 XP
What you need:
Chromebook/Laptop/PC or iPad/Tablet

Diver Game

In this game you dive underwater to collect starfish but be careful of the shark chasing you!

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 - Create a new Scratch project

    Create a new Scratch project and delete the cat sprite.

    In this game there will be 3 sprites

    1. a diver that you will control with your mouse
    2. starfish that will appear in a random position and you will collect
    3. a shark that will slowly follow and try and catch you

    2 - Add the Underwater 1 backdrop

    Add the Underwater 1 backdrop to the project.


    3 - Add and program the Diver1 sprite

    Add the Diver1 sprite from the sprite library. We are going to program the diver to always point towards your mouse pointer and move towards it. This is how you will control where the diver swims to.

    Add the following code to the Diver1 sprite.

    whenclickedgotox150y0setsizeto50%foreverpointtowardsmouse-pointermove4steps




    4 - Add the Starfish sprite

    Now add the Starfish sprite to your project.


    5 - Hide the Starfish and create a clone

    At the start of the game the starfish will appear in a random position and each time you catch a starfish a new one will appear somewhere else.

    Add the following code to the Starfish sprite to change it's size, hide it and create a copy of it.

    whenclickedsetsizeto30%hidecreatecloneofmyself

    We will program what to do when it's copied in the next step.


    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