Scratch
Beginner
40 mins
Teacher/Student led
+150 XP
Pupils work on their own device

Studio: Shark Swim

Students build a shark chase game in Scratch using movement, sensing and score, following a PRIMM code-along and fixing at least one bug as they go.

Teacher Class Feed

Load previous activity

    1 - Start: What We're Building ~4 mins

    Illustration for Start: what we're buildingToday you are coding in Scratch. You will build Shark Swim step by step at your device: a diver who swims a course, dodges a shark, and tries to reach the finish.

    You can already move sprites and run a project. Today you will put movement, sensing and a win condition together into one chase game, and you will practise debugging when something does not behave as you expect.

    Before you run anything, think: what do you expect to happen if the diver touches a wall or the shark?

    2 - The Plan: Four Parts to Build ~2 mins

    Shark Swim has four parts:

    1. A diver you swim along a course.
    2. A shark that appears and moves.
    3. A crash that is detected when the two meet.
    4. A finish line that ends the game.

    Test each part on its own before adding the next.


    3 - Create a New Scratch Project ~2 mins

    Create a new Scratch project and delete the cat sprite.


    4 - Create the Backdrop ~3 mins

    In the game a diver will swim through a course to try and reach the end without touching the edges or getting caught by the shark.

    Paint a new backdrop with the following:

    1. A blue background (use the square tool ).
    2. A course with lanes for the diver to swim (use the paint brush tool  thickness 20). In our example we use red lines.
    3. A finish line (use the paint brush tool  thickness 20). In our example we use a green line.


    123learn · Online learning platform

    Unlock the full learning experience

    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.

    Hundreds of curriculum-aligned lessons
    Interactive activities in every lesson
    Printable resources & progress tracking
    Copyright Notice
    This lesson is copyright of Coding Ireland 2017 - 2026. 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