Building a Super Mario Game with Claude Code Agent Teams | The AI Built Its Own Team
"I told Claude Code to build a Super Mario-style game using Agent Teams. The AI formed its own team, split the roles, and delivered a 2D platformer in 15 minutes. 2,711 lines of pure HTML/CSS/JS, zero image files. Real benefits and honest limitations."
The AI Formed a Team and Built a Super Mario-Style Game
Hello.
Have you ever heard of the concept of AI forming a team to work together?
Think of AI as a person.
A team lead AI and teammate AIs form a team, actively communicate, and build something together.
That's basically the concept of Agent Teams.
Last time, Claude Code built 6 simple games like Snake and Tetris all by itself.
This time, I'm going to have an AI team tackle something more complex — a "Super Mario" style game.
I Asked the AI to Form a Team
First, I made this request to Claude Code:
Let's build a Super Mario-style 2D game! But I don't want the AI working alone! I want you to form an Agent Team — a team of AIs — to develop this together. I want faster results!
And Claude Code formed its own team like this:
Engine: Physics engine, collision detection, camera, game loop
Level: Map data, block/pipe/enemy/item placement
Graphics: Sprite rendering, animation, background, UI
Here's the team structure:
| Teammate | Role | File |
|---|---|---|
| Engine | Physics, collision detection, camera, game loop, input | js/engine.js |
| Level | Map data (212 tiles), blocks/pipes/enemies/items | js/level.js |
| Graphics | Sprites, animation, background, UI display | js/graphics.js |
This structure has each teammate modifying only their own file, with the team leader integrating the results.
Here's the important part.
I didn't tell it how to organize the team.
I simply asked it to form a team and deliver fast results.
The AI looked at the project's scope and characteristics, then split the roles and assigned teammates on its own.
The First Attempt Failed
However, the first attempt ended in failure.
The reason was that the teammate AIs didn't have file write permissions.
Background agents can't show the user a "Can I write this file?" confirmation prompt, so the requests were automatically denied.
So I asked Claude Code to grant file write permissions to the agents.

json
{ "permissions": { "allow": ["Write", "Edit", "Bash(mkdir:*)", "Bash(ls:*)", "Bash(cat:*)", "Bash(touch:*)"] } }
When issues like this come up, just ask Claude Code to analyze the cause and fix the problem.
This single configuration made all team work run smoothly.
The Game Was Built in 15 Minutes
After setting permissions, I ran it again.
And the game was ready in 15 minutes.
This was built in 15 minutes?
I honestly couldn't believe it.

A side-scrolling map with blocks, pipes, gaps, enemies (21 Goombas), and a goal flag.
Everything built in pure HTML, CSS, and JavaScript. Zero image files.
All graphics drawn entirely with Canvas API code.
I Got Greedy
Once the base game was running, I wanted more.
I made additional requests to the AI:
Make the character jump higher. Add a charge attack — hold to charge energy, release to fire. And add another character — a Ninja Turtle. The Ninja Turtle should attack with a staff.

And the AI formed an Agent Team and completed the work in 3 minutes.
The Charge Attack Works
Hold the X key to charge energy. Up to 1 second. Release to fire an energy ball.
| Charge Level | Size | Speed | Gauge Color |
|---|---|---|---|
| Low | 12px | 5 | Blue |
| Medium | 18px | 7.5 | Yellow |
| High | 20px | 8.5 | Orange |
| Maximum | 24px | 10 | Red |
The energy ball renders with a white core + orange glow + trail effect.
Hitting an enemy triggers knockback + 200 points + explosion particles, and it can destroy brick blocks too.
All of these visuals are drawn entirely with code — not a single image file.
Ninja Turtle Has Entered the Game
Can you see it? A Ninja Turtle has crashed into the Super Mario game.

Below is how the AI defined each character's abilities:
Pixel Hero (Default)
Speed ★★★ / Jump ★★★★
Skill: Fireball — Hold X to charge, release for ranged attack
Safe, long-range play style
Ninja Turtle (New)
Speed ★★★★ / Jump ★★★
Skill: Bo Staff — Press X for instant melee strike
Green skin, blue mask (Leonardo), brown shell
40px forward melee hitbox, fast and aggressive play style
Character selection, skill differences, stat balancing — all designed by the AI.
The Numbers
| Item | Value |
|---|---|
| Total code | 2,711 lines |
| engine.js | 965 lines |
| graphics.js | 1,213 lines |
| level.js | 302 lines |
| index.html | 231 lines |
| Map size | 212 x 15 tiles (6 sections) |
| Enemies | 21 Goombas |
| Playable characters | 2 |
| Image files | 0 (everything drawn with code) |
| Server cost | $0 |
| Time to first build | 15 minutes |
Honest Thoughts After Using Agent Teams
First, I thought I'd need to give very specific instructions, but
"Form a team and build it"
That one sentence was all it took.
The AI assigned the team roles on its own.
Real Benefits
1. Speed Through Parallel Work
3 AIs modified their respective files simultaneously. Working alone, it would have had to go through graphics.js → engine.js → index.html sequentially. Since the files were independent, parallel processing worked without conflicts.
2. Forced Clean Architecture
Splitting into teams naturally established the engine / graphics / level structure. When a single AI writes everything, code tends to pile into one file. The role division itself kept the architecture clean.
3. Context Window Efficiency
Each agent focuses exclusively on its own file, so no single agent needs to hold all 2,711 lines in memory. Especially for a large file like graphics.js (1,213 lines), having a dedicated agent handle it was far more effective.
Honest Limitations
| Problem | Details |
|---|---|
| Permission Failure | First attempt failed because teammate AIs didn't have file write permissions |
| Missing Code | Graphics agent omitted some functions → Main AI had to fill in the gaps |
| Integration Cost | Every phase required the main AI to verify results and fill in missing pieces |
In conclusion, Agent Teams is closer to parallel copilots than a fully autonomous team.
By parallel copilots, I mean multiple AIs work on their tasks simultaneously, but the team lead AI must handle final verification and integration.
The team lead AI must always verify and clean up the results.
But compare working through 2,711 lines sequentially with one AI versus having 3 work simultaneously while the lead integrates.
The latter is clearly faster, and the code structure ends up cleaner.
What I Took Away From This
I wondered if there were more engineering insights to extract here, but
I think in the future, AI will optimize and build things on its own without humans even having to ask.
I wanted to learn how to use AI well, but it seems we've entered an era where using AI well is something the AI does for you.
With one sentence — "form a team and build it" — the AI organized its own team, split the roles, worked in parallel, and built a game in 15 minutes.
Man, what are people going to do from here?
It really feels like a scary era.
Git Code
Here's the git repository for this project. Feel free to check it out.
https://github.com/johnehk86/pixel_adventure
I'm an embedded software developer in the automotive industry who builds AI-powered services as AICRAFTER. I'm documenting this journey at aicraftlog.com.
Related Posts
Stay Updated
Get notified when I publish new posts. No spam, unsubscribe anytime.
