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

Studio: AI Pose Space Game

Students load their trained pose model into Scratch and build a space game steered by leaning left and right, then tune the confidence threshold so the controls feel reliable.

Teacher Class Feed

Load previous activity

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

    Illustration for Start: what we're buildingYou can already train a pose model. Today you will load that model into Scratch and build a space game you steer by leaning left and right.

    You will start a new project in Stretch3 and build the game step by step, testing and fixing it as you go.

    Think about it

    Before you touch any code: how would leaning your body to one side make a rocket move across the screen?

    2 - The Plan: Five Parts to Build ~3 mins

    Your pose-controlled space game has five parts:

    1. Load your model into Scratch.
    2. Read the pose it sees, and set how confident it must be before you act on it.
    3. Move the rocket left and right from that pose.
    4. Check the pose regularly rather than once.
    5. Add stars that fall for you to dodge or catch.

    If the rocket jitters or ignores you, it is almost always the confidence threshold or how often you are checking.


    3 - Set Up Stretch3 and TMPose2Scratch ~3 mins

    Set up a new project in Stretch3 with the TMPose2Scratch extension:

    1. Go to https://stretch3.github.io/ and start a new project.
    2. Delete the Cat sprite.
    3. Click the Extensions button at the bottom left of the screen and choose TMPose2Scratch (not Posenet2Scratch or TM2Scratch). This extension lets you use Google Teachable Machine pose models in Scratch.
    4. The extension tries to use your computer's camera straight away. If your browser asks, click Allow. You should now see what the camera shows on the stage.


    4 - Add the Rocketship Sprite ~2 mins

    Add the Rocketship sprite to the project and then add the following code to it, to position it at the bottom centre of the stage area and shrink its size.

    when green flag clicked go to x (0) y (-150) set size to (30) %

    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