
This morning I was sitting in on a LinkedIn Learning course as a Pathway to better understanding AI. One of the video’s talked about quikcly creating a Tetris game using Claude AI, which got me thinking ‘Can I use this for capturing xAPI as well?’
This article walks you through my very quick journey of developing an xAPI-enabled version of Space Invaders using AI tools ChatGPT and Claude, demonstrating how AI-assisted development can accelerate innovation.
You can play the game here: Space Invaders xAPI Demo
The Initial Idea: AI-Assisted Development
It all started with a simple prompt. I wanted to create a version of Space Invaders that could capture gameplay data using xAPI, allowing us to track player interactions and analyse them. To get started, I asked Claude:
“I want you to create an HTML file that will have the game Space Invaders. The file must be styled like the 80s game. What I also want is to capture events as xAPI and send them to an LRS.”
From this initial prompt, Claude provided a foundational version of the game with xAPI tracking. This became the starting point for an iterative development process, where AI assisted in coding, debugging, and refining features.
After saving the file, I switched to ChatGPT. I have the Visual Studio Plugin, so I was able to interact with the file and update.
How AI and xAPI Work Together
The goal of this project was not just to build a game but to demonstrate how AI can help integrate xAPI into any interactive platform. Here’s how AI contributed at different stages:
Code Generation:
- Claude quickly generated the basic HTML, CSS, and JavaScript structure for the game.
- It included 80s-style visuals and simple player controls.
- ChatGPT and VS Code integration allowed me to refine the code
xAPI Event Tracking:
- I asked AI to integrate xAPI statements to track player actions like shooting, hitting an enemy, and losing a life.
- AI structured the xAPI statements to ensure compatibility with the Learning Record Store (LRS).
Debugging and Testing:
- ChatGPT helped troubleshoot issues, such as CORS restrictions and data format errors.
- AI suggested fixes to ensure xAPI statements were correctly structured and accepted by the LRS.
Enhancing Features:
- AI assisted in adding player name tracking and a high-score system linked to xAPI data.
- A dashboard button was implemented to let users view their gameplay analytics.

The Power of AI-Driven Development
This simple concept showcased how AI can assist non-technical users in building interactive experiences that capture meaningful data. With AI, developers can:
- Rapidly prototype and test applications.
- Implement complex features like xAPI tracking with minimal manual effort.
- Debug and optimize functionality more efficiently.
For educators and training professionals, this means they can create engaging learning experiences while collecting valuable learner data for insights and improvement.
Final Thoughts
AI is no longer just a futuristic concept; it’s a practical tool that can revolutionize how we develop applications. By combining AI’s coding capabilities with xAPI’s powerful tracking features, we can build richer, data-driven experiences across industries.
If you’re interested in how AI and xAPI can work together in your projects, start experimenting today. And don’t forget to try out our AI-assisted Space Invaders game: Space Invaders xAPI Demo – feel free to save the file and add your own LRS details and run it.
Written with a little help from ChatGPT, right after it helped me with refining the code!