Building an Idle Game by Asking Claude
This one started as an experiment: how far can you get building a real game by describing it to Claude Code and letting it write the code? Not a toy demo — something with progression, save files, multiple systems that interact. The answer, after a couple of weeks of evenings, is "further than expected, with some very familiar potholes along the way."
This is the log of that build. The game is called Neural Grid — AI Infrastructure Management Simulator, and you can play it in your browser.
The concept
An AI-themed idle game: Cookie Clicker's clicker loop and big numbers, crossed with the skill depth of Melvor Idle. The twist is a world map — you place data centres in real geographic regions, draw network links between them, and defend them from "firewall attacks" that arrive as boss events.
The first thing I asked Claude for was a plan, not code. What came back:
Tech stack
| Layer | Choice | Reason |
|---|---|---|
| Build tool | Vite | Fast HMR, TypeScript out of the box |
| UI | React + TypeScript | Component model fits idle-game panels |
| State | Zustand | Minimal boilerplate for game state |
| Map | react-simple-maps | Lightweight SVG world map, easy click regions |
| Network overlay | Custom SVG | Lines drawn over the map between data-centre markers |
| Styling | Tailwind CSS | Utility classes, dark sci-fi theme |
MVP scope (phase 1)
A 100 ms tick loop driving resource accumulation; a resource bar with formatted big numbers; a click button to earn compute manually; the world map with six regions and only North America unlocked; data-centre placement that costs credits; the SVG network overlay connecting regions that both have a data centre; an upgrades panel with five starter upgrades; and a region sidebar showing the selected region's details.
Phase 2 was explicitly parked: bosses, Melvor-style skill tracks, prestige, save/load, sound.
First run: a deadlock
The scaffold built and ran. Then the first bug:
I've manually got some credits, but the option to build a data centre won't enable.
Claude's diagnosis: credits only came from passive tick production — which needs a data centre, which costs credits. Classic chicken-and-egg. Clicking added compute but never converted any of it to credits, so the build button never lit up. The fix was to make clicking convert compute to credits at the same 10% rate as passive production.
Day two: bosses, sound, saves, a market
With the core loop working, phase 2 landed in one session: boss events, sound effects, save/load with offline earnings, and a procurement market for raw materials. Regions gained mines that yield metals — copper, lithium, gold and so on — which feed into building costs.
Bosses arrive as a modal — a "firewall breach" you either counterattack (spending resources) or ignore (taking a CPS penalty).
Day three: splitting the economy
The single "credits" currency was doing too much work, so I pitched a redesign:
AI is expensive. I'd like a concept where we split credits into chips and money. You can sell compute power for money. Building a data centre needs credits. Unlocking a region needs money. It's possible to get more money from a loan, but then the game takes interest payments — the loan needs to be paid back.
Claude liked it, and mapped it out before touching code:
- Chips ₵ (was credits) — earned passively as a percentage of compute. Spent on buildings, upgrades, skills.
- Money $ — earned only by selling compute. Spent on unlocking regions and repaying loans.
- Loans — borrow a lump sum now; the game deducts interest every second. Unpaid interest accrues as debt rather than pushing the balance negative, and enough debt starts inflating build costs and eventually blocks region unlocks.
Loan tiers ran from a $500 "Small" at 0.02%/s up to a $30,000 "Massive" at 0.05%/s. The point was economic tension: selling compute for money means giving up passive chip generation, and a loan you can't service quietly strangles your expansion.
The implementation plan touched two new files and sixteen existing ones — mostly a credits → chips rename, plus a new loan store and a market overhaul with Sell and Bank tabs.
Around here Claude also added region synergy — data centres in the same region now suffer an "overcrowding" efficiency penalty past a threshold, and mines drain a little data-centre power, so region-building became a layout puzzle rather than a "build everything" checklist.
Where it stood: gaps before polish
At this point I asked for an honest assessment rather than more features. The list was uncomfortable and correct:
- No new-player experience. Someone opening the game cold has no idea what chips are for, why bandwidth matters, or that prestige exists.
- Bandwidth and security are mostly dead weight. They accumulate but only get spent in boss combat and research unlocks — passive numbers with no agency.
- Materials feel like a tax, not a system. Fifteen-plus material types pile up with nowhere to go after the first data centre.
- The click verb dies mid-game. Once CPS is high, clicking is pointless and the click upgrades become irrelevant.
- No run stats or history. Idle games live on "this run I got X% faster" — there was no run timer, no comparison to previous runs.
- No ending or goal clarity. Infinite loops with no stated horizon.
- Balance has never been validated. The cost curves across five prestige levels plus singularity had never been playtested end to end.
Days four and five: feature-complete isn't finished
More content followed — additional boss mechanics (a persistent "siege" that corrupts resources over time, a fast "network intercept" with a 20-second choice window, a region-infection boss), more upgrade tiers, a research tree, achievements, a win condition with a narrative arc.
By day five the assessment was: the core loop is feature-complete — clear start, mid-game, late-game and win condition — but "feature-complete" and "finished" aren't the same thing. The standout remaining gaps: player guidance still only covered the first five minutes; balance was still unverified; bandwidth and security still felt inert; the boss-video folder was empty so some bosses showed a black panel; and the singularity shop had six items against twelve in the prestige shop.
Day six: a balance pass and a tidy-up
The balance pass slowed the mid-game snowball: upgrade multipliers halved, skill costs up 10×, region unlocks up ~2.5×, and the chip conversion rate dropped from 10% to 6%. The right-hand panel went from eight tabs to six, folding stats into the achievements panel and replacing the settings tab with a gear icon.
Day seven: the polish list
Two of these were real correctness bugs:
- Chips-per-click was wrong. Clicking granted chips at a 1:1 rate with compute, while passive generation was 6% — so clicking short-circuited the early economy.
- Level 7–10 building colours were missing in one panel that kept its own duplicate colour map, so high-level buildings fell back to a default colour there.
The rest was UX clarity (no tooltip explaining chips vs money, no visual cue for the prestige tier chain) and balance feel (the research unlock gate landing well after it felt relevant).
What it's like to build this way
Two things stand out from the log.
The first is how much ground you can cover. Neural Grid ended up with a full progression arc, six distinct boss mechanics each with their own UI, materials and crafting, a research tree, loans, skills, save/load with offline earnings, achievements and run stats — built in evenings, by describing what I wanted.
The second is that the failure modes are the ones you'd expect from any collaborator working fast. Twice I asked "what should we work on next?" and got a confident list of features — statistics panel, settings, export/import saves — that already existed:
Yeah, quite a bit already exists — StatsPanel, SettingsPanel, AscensionModal, DebugPanel. My list was sloppy.
The model is good at generating plausible next steps and less good at first checking what's already there. The useful move, every time, was to stop asking for features and ask for an honest assessment of the gaps instead — and then to go and play the thing, because the one gap it could never close on its own was "has anyone actually played a full run under these numbers?"
And that's where the project now sits. It isn't well balanced. The cost curves, the prestige gates, the singularity threshold — they were all set by reasoning about what should feel right, never by playing through and feeling where it drags or snowballs. Fixing that isn't another polish pass; it means going back to the drawing board and actually designing a balanced game — mapping the intended pace of a run, working out the maths that produces it, and testing it against real sessions. Claude can build almost any system you describe. It can't tell you whether the whole thing is fun to play, and that turns out to be the hard part.