Scratch
Beginner
40 mins
Teacher/Student led
+150 XP

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 - Introduction ~3 mins

    In this lesson, you will create a fun Space game using Scratch and Google Teachable Machine.

    You will learn how to use your Teachable Machine Pose model with tilt poses to control a spaceship.

    If you don't have a Teachable Machine Pose model, don't worry! You can use the provided model.

    The Preview panel predicting a pose from the webcam, with output bars for Tilt Left, Tilt Right and No Tilt

    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