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

Crabby Cursor Chaser

This lesson guides students through creating a game called 'Crabby Cursor Chaser' using Scratch. They'll learn how to add and animate a sprite, make it follow the mouse cursor, and add a backdrop to set the scene for their game.
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

    Today, we're going on an underwater adventure with a friendly crab. We're going to create a fun game where a crab will chase your mouse cursor around the screen.

    You'll learn how to add a new sprite, animate it, and get it to chase your mouse cursor. So, let's dive in and start coding!


    2 - Create a new project

    Open the Scratch website in a new tab and create a new project. Delete the cat sprite from the project.

    scratch.mit.edu


    3 - Add the crab sprite

    In this project we are going to make a crab chase after our mouse cursor.

    Let's add the Crab sprite to our project from the sprite library.


    4 - Point the crab towards the mouse

    In this step, we will make the crab point towards your mouse cursor. The mouse cursor is the arrow or pointer that moves around when you move your mouse. Let's get started!

    Add the following Scratch code to your crab sprite: when green flag clicked forever point towards [mouse-pointer v] end

    Now, click the green flag to start your project. You should see the crab always pointing towards your mouse cursor. If it does, well done! If not, check your code and try again.


    5 - Make the Crab Walk

    Now, we are going to make the crab walk towards your mouse cursor! Just like how you keep walking until you reach your destination, the crab will keep walking because it is inside the forever block. 

    Add the move (10) steps block inside the forever block:: when green flag clicked forever point towards [mouse-pointer v] move (10) steps //add this block end

    Click the green flag to start your game. You should see the crab walking towards your mouse cursor. If it does, well done! If it doesn't, check your code and try again.


    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