Leçon 1, Chapitre 1
En cours

Pictoblox coding – AI Space Battle (teachers)

Yann KIDSHAKER 19 mars 2026

AI Space Battle Game

Objectives

After this lesson, students will be able to:

  • Implement the concept of human body parts tracking that they were introduced to, in the previous session in the ‘Space Battle game’.
  • Control movement of their Rocketship with their fingers to shoot bullets at ghost sprites. They will do this using finger tracing with AI.
  • Create more such projects, that use tracking of human body parts.
Introduction

In this session we transform the Space Battle Game that we previously built to include AI capabilities. Here, we modify the script within the Space Battle Game, such that the movement of Rocketship can be controlled using the movements of our hand, instead of the keys of our device.

Such modification of the code, is also an introduction to the concept of ‘code refactoring’, i.e upgrading the code to include new functionalities. This concept is implemented, practically all the time in the industry.

 

Activity

Space battle game in PictoBlox, built using AI, to control the rocketship using your hand to shoot bullets at ghosts.

Teaching Resources
PicoBlox Code
Title Description File
AI Space Battle Game Controlling rocketship with hand to shoot bullets at ghosts https://ai.thestempedia.com/wp-content/uploads/2022/03/session6_AI-Space-Battle-Game.sb3
Timeline
Title Approximate Duration Procedure Reference Material
Recap of the previous sessions 5
  1. Give a recap of the Space Battle Game built in the previous session.
  2. Also give a recap of Finger Tracing with AI built in the previous session.
Lecture Slide
(of previous two sessions)
Activity: AI Space Battle Game 30
  1. Ask students to open the PictoBlox on the computer.
  2. Open the Space Battle Game that they have built in the previous session.
  3. Demonstrate the procedure given in the AI Space Battle Game Activity Sheet to the students.
  4. Ask the students to follow the instructions to create the project.
  5. At the end of the activity, the teacher must check if all the students have created the project and provide feedback accordingly.
 Lecture Slide, PictoBlox File and
Activity Sheet
Concluding the session 5
  1. Make sure that all the students save their script properly before closing PictoBlox.
  2. Give a summary of the points covered in the lecture.
Lecture Slide
Things to Remember
Before Class
  1. Make sure each PC has the latest version of PictoBlox installed and running.
  2. Make sure all the students have the project Space Battle Game prepared on their devices.
During Class
  1. If the students are unable to find a block, point them to the color of the block on the block palette.
  2. Make sure they write the script by selecting the appropriate sprite.
After Class
  1. Make sure students save their codes/scripts.
  2. Make sure they shut down the PC/Laptops.