← All work

Personal project

Cosmic Invaders: a game built by AI agents

I built a system where AI agents plan, code, and test a game, then used it to make a Space Invaders-style arcade game you can play in your browser.

Playable on the web 3 days after the first commit

Play it in your browser →Screenshot of Cosmic Invaders: the player's ship fights a red mothership over a city skyline at night.

The problem

Even a small game takes a lot of work: design, art, sound, code, and a ton of testing. I wanted to find out how much of that I could hand off to AI agents if I gave them a clear process to follow, and whether I could reuse that process for the next project.

The approach

I built a pipeline I call GameFactory. It starts with an interview about the game I want, turns my answers into a written spec, and breaks the spec into small tasks. Each task comes with its own automated tests.

Several AI agents then work on different tasks at the same time, each in its own copy of the project. Nothing gets merged until the full test suite passes. I also built a bot that plays the game on its own, so the tests cover how the game actually plays and not just whether the code runs.

Act 2 of Cosmic Invaders: rows of alien invaders above the player’s shielded ship in deep space.

The result

A full arcade game with three acts, a boss at the end of each one, power-ups, and generated music. It runs in a browser on desktop or phone, and it was playable on the web three days after the first commit. Behind it are 60 tasks and more than 400 automated tests.

The Hive Queen boss fight at the end of Act 3.

Every new build goes to a preview link first. People can send feedback straight from the pause menu, and it shows up as a ticket I can act on. The pipeline itself is reusable, so starting the next game takes one command.

I use the same approach on client work: write down exactly what we’re building, break it into small pieces, and test each piece automatically.

Play it in your browser →

Want to talk it through?

Book a free 30-minute call. Tell me what's eating up your team's time, and I'll give you an honest answer about whether I can help.