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.

    Before you change anything, look at the plan for the rocket and stars. How do you think a tilt pose will make the rocket move?

    Open the project you saved earlier (or start fresh in Stretch3 as guided). You will predict, build, run, and fix as you go.

    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 Image model, don't worry! You can use the provided model.


    3 - Setup Scratch and Tmpose2scratch ~3 mins

    Go to https://stretch3.github.io/ and start a new Scratch project and delete the Cat sprite.

    Then, add the TMPose2Scratch extension by clicking on the Extensions button at the bottom left corner of the screen and selecting TMPose2Scratch. This extension allows you to use Google Teachable Machine pose models in your Scratch projects.

    When you add this extension, it will automatically try and use your computer's camera. If necessary, click on 'Allow' to give it permission to use your camera. You should see what the camera is showing in the stage area.



    4 - Add the Rocketship Sprite ~2 mins

    Add the Rocketship sprite to the project and then add the following code to it, to shrink it's size and position a the bottom center of the stage area.

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

    5 - Load Teachable Machine Model ~3 mins

    Now, let's set up the pose model that our project will use. Add the following new code to your sprite:

    when green flag clicked set size to (40) % go to x (0) y (-150) pose classification model URL [link to your model] :: extension

    Put the link of your pose model into the pose classification model URL block.

    If you don't have your own pose model URL, you can use this one: https://teachablemachine.withgoogle.com/models/R9i0aRHth/

    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 - 2025. 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