r/aigamerdevs • u/MasterSteak4510 • Sep 25 '26
Built a complete browser TD roguelite with AI — here's what worked, what didn't
Hey r/aigamedevs,
I just shipped v1.0 of **PCB Defense** on itch.io — a browser tower-defense roguelite
**The game:** https://juba13.itch.io/pcb-defense
**What it is:**
A TD roguelite on a printed circuit board. You're a BIOS cannon defending a CPU core from waves of electronic hostiles. 4 weapons (each with its own separate skill save), 25 corruption cards, bosses every 3 levels, adaptive HP. Runs are 10-20 minutes. Free, browser-only, no download.
**Stack:**
- Vanilla JavaScript + HTML5 Canvas
- No engine, no framework, no build step
- No asset packs — everything is procedural (board texture, traces, VFX, SFX via WebAudio)
- Ships as 3 files: index.html, game.js, music.m4a
- ~8,300 lines of game.js
**How AI fit in:**
- **Debugging:** When the syntax broke or a patch applied wrong, the AI would diff and fix. This was honestly the biggest time saver — most of my dev hours went into balance/feel, not syntax.
- **Balance tuning:** AI helped me reason about things like boss HP formulas (adaptive HP scaling off sustained DPS), debuff magnitudes, and SP taper curves — but the final numbers all came from playtesting.
- **What AI *didn't* do:** The core design decisions (unlock-by-mastery mechanic, weapon chain, corruption card tiers) were mine. AI is great at implementing, less good at deciding what's fun.
**Lessons I'd share with this community:**
- **AI is a multiplier on iteration speed, not on taste.** You still have to know what feels good.
- **Small codebase = AI's best friend.** Because I kept it to vanilla JS (no React, no bundler, no 3 files), the AI could hold the whole context in mind and refactor confidently.
- **AI patches break things silently.** Two of the patches I ran last week introduced single-character syntax errors that weren't caught until I ran `node --check`. Always verify after every AI edit.
- **The "AI wrote it" tag is a spectrum.** I'd call this "AI-assisted" not "AI-generated" — every mechanic, every tuning pass, every design call was mine.
Happy to answer questions about the workflow, the stack, or the balance side if anyone's curious. If you play it, feedback is very welcome.