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 |
|
Lecture Slide (of previous two sessions) |
| Activity: AI Space Battle Game | 30 |
|
Lecture Slide, PictoBlox File and Activity Sheet |
| Concluding the session | 5 |
|
Lecture Slide |
Things to Remember
Before Class
- Make sure each PC has the latest version of PictoBlox installed and running.
- Make sure all the students have the project Space Battle Game prepared on their devices.
During Class
- If the students are unable to find a block, point them to the color of the block on the block palette.
- Make sure they write the script by selecting the appropriate sprite.
After Class
- Make sure students save their codes/scripts.
- Make sure they shut down the PC/Laptops.