Scratch Game
Expert
60 mins
Teacher/Student led
+145 XP
What you need:
Chromebook/Laptop/PC or iPad/Tablet

Keepy Ups

In this Scratch game we will use the video sensing blocks to interact and play a game where we have to keep multiple footballs in the air!

To do this lesson your computer must have a camera on it.

Teacher Class Feed

Load previous activity

    1 - Create a new Scratch project

    Create a new Scratch project and delete the cat sprite.

    https://scratch.mit.edu

    2 - Add the Basketball sprite

    Add the Basketball sprite from the sprite library.


    3 - Add the Video Sensing extension

    We're going to use the camera that's in your computer to take a video and put you in the game!

    Add the Video Sensing Extension so that we can use the Video Sensing blocks.

    Then add the following code to Basketball sprite, to turn on the camera on your computer.

    when green flag clicked turn video [on v]

    You may see a pop up asking you to allow Scratch to use your camera. Click on the Allow button otherwise Scratch will not be able to use your camera.


    4 - Create a custom 'go to top' block

    We're going to create a custom block of our own that we'll use to move the basketball up to a random place at the top of the screen.

    Create a custom block called 'go to top' and add the following code to the define  go to top block to make the basketball go to a random place at the top of the stage area.

    define go to top go to x (pick random (-250) to (250)) y (250) when green flag clicked turn video [on v] // add it under here go to top

    And then add the go to top block underneath the when clicked block.

    Test that it works by clicking the green flag several times. The basketball should go to different random places at the top of the stage area.


    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