I Asked AI to Build Me a Pokémon Game in the Browser. It Delivered a Full AAA RPG.
Source: Dev.to
What started as a weekend experiment turned into one of the most fun things I’ve shipped this year. After months of tinkering with AI‑assisted game development—usually ending up with a simple moving square or a basic UI—I decided to treat the AI like a Lead AAA Game Architect. The result is CodeMon: The Kernel Uprising, a fully playable, feature‑rich browser RPG built entirely in vanilla HTML, CSS, and Three.js. No game engine, no Unity, no Unreal—just a single .html file that feels like a AAA production.
Play CodeMon: The Kernel Uprising
Source Code
AI Relay Architecture
To avoid “context drift” and hallucinations, I split the work among six specialized AI models, each passing its output to the next in a relay:
The Architect (Claude 3.5 Sonnet)
Defined the foundational GS (Game State) object, the immutable source of truth that coordinates mode switches (overworld, battle, shop, dialogue).
The Visualist (Gemini 1.5 Pro)
Handled Three.js heavy lifting, optimizing the 60 × 60 grid with Instanced Meshes to keep draw calls low and frame rates high.
The Sound Designer (GPT‑4o)
Created a Procedural Sound Manager that synthesizes every “hit” and “heal” using the raw Web Audio API—no audio files required.
The Debugger (DeepSeek)
Polished O(1) collision detection, ensuring the player can’t “ghost” through Server Towers.
The UI/UX Specialist (Llama 3)
Crafted the CSS “Terminal” aesthetic, custom hit‑splat animations, and a live‑updating HUD.
The Narrative Lead (Mistral)
Wrote dialogue for the Storyteller and the “Kernel Master” boss encounter lore.
Game State (GS) Object
const GS = {
mode: 'OVERWORLD', // OVERWORLD | BATTLE | SHOP | DIALOGUE
player: {
hp: 100,
bits: 0,
level: 5,
questGoal: 500,
},
world: {
collisionSet: new Set()
}
};
Every system checks GS.mode first, preventing random encounters from triggering during NPC conversations or other non‑overworld states.
Procedural Sound Manager
All audio is generated on the fly:
- Walking – soft, low‑frequency square wave on each step.
- Critical Hits – multi‑frequency sawtooth burst for a “crunch” feel.
- Boss Motif – low‑frequency sawtooth theme signaling high stakes.
Implemented with the Web Audio API’s oscillators, the manager eliminates the need for external sound assets.
Dynamic Camera and Visuals
- Action Cam – during the enemy’s turn, the camera lerps to a dramatic side angle to highlight the “Syntax Error” attack.
- Companion Drone – a 3D bot floats beside the player, firing
LineSegmentslaser geometry whenever you attack. - Hit Splats – DOM elements generate floating numbers that fade out (yellow for crits, green for heals).
Economy
You farm Bits by defeating NullPointers and Bugs in the “Dead Logic Woods,” then spend them on permanent upgrades at the Merchant Terminal.
| Module | Cost | Effect |
|---|---|---|
OVERCLOCK.exe | ₿400 | Permanent increase to base Attack Power |
BUFFER.alloc | ₿300 | Increases Max HP by 30 points |
RECOVERY.exe | ₿150 | Refills 2 Heal Charges for your REFACTOR tool |
FIREWALL.conf | ₿350 | Permanent increase to base Defense |
Technical Highlights
- Instanced Meshes are Non‑Negotiable – Rendering 3,600 individual floor tiles would tank FPS; instancing reduces this to just 4 draw calls per biome.
- O(1) Collision is King – Instead of raycasting each frame, every solid coordinate is stored in a
Set; collision checks become a simple.has()call. - Prompt Specificity – By asking the AI for architecture rather than isolated features, the final codebase grew to 1,700+ lines of structured, maintainable code.
Future Plans
- “Memory Leak” Swamp – A biome where movement slows and the UI visually “corrupts.”
- Local Storage Save System – Persist your Level 10 Coder and hoard of Bits across sessions.
- Inventory UI – Shift from instant upgrades to a backpack of items usable in battle.
Acknowledgements
Huge thanks to EmberNoGlow for the original Dev.to challenge that proved AI can build something truly “AAA” when guided by a well‑structured team of experts.
Discussion
What do you think? Would you play an RPG built by a 6‑AI squad? Let’s talk in the comments.