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

Dino food game

In this lesson, students will learn to create a simple game using Scratch. They will add and manipulate characters, control movement using keyboard keys, and make characters interact. They will also learn to add a backdrop to 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 - Welcome to Dino Food Game

    Welcome to our exciting coding adventure! Today, we're going to create a fun game using Scratch. In this game, you'll control a dinosaur who loves to eat beetles. Your job is to help the dinosaur catch as many beetles as it can. We'll learn how to add characters, make them move, and even add sounds. Let's get started!

    2 - Create a new Scratch project

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

    scratch.mit.edu


    3 - Add a character

    In the game we are going to make a dinosaur move around by using the arrow keys on our keyboard.

    But first let's add the Dinosaur4 sprite from the sprite library.


    4 - Shrink the dinosaur

    When the dinosaur sprite gets added to our project, it's a bit too big for our game so let's add some code to shrink it and make it smaller.

    Add the following code to the dinosaur sprite:

    when green flag clicked set size to (50) %

    Click on the green flag and the dinosaur sprite will shrink to half it's normal size.

    5 - Make the dinosaur move up and down

    Next we will program the dinosaur sprite to move up and down when we press the up and down arrow keys on our keyboard.

    Each time we press an arrow key, we will point the dinosaur in that direction and then make them move 10 steps.

    Add the following code to the dinosaur sprite:

    when [up arrow v] key pressed point in direction (0) move (10) steps when [down arrow v] key pressed point in direction (180) move (10) steps

    Once you've added the code test that it works by pressing the up and down arrow keys and checking that the dinosaur moves in the correct direction. If the dinosaur goes in the wrong direction, check that you have the right numbers in the code blocks.


    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