Real-time node-capture strategy games — the lineage running from Galcon to modern browser castle-conquering games — look deceptively simple on paper. You have a graph of castles connected by roads, troops regenerate over time, and you drag from one castle to march armies into another.

When I built Conquer Clash, I ran into two engineering problems that sound easy until you ship them to real players:

  1. Procedural maps frequently produce unwinnable or boring layouts if you don't validate them beyond basic graph connectivity.
  2. Casual browser multiplayer dies immediately if you ask for an account — or if a friend room sits stuck at 2/4 players waiting for a full lobby.

Here is how I approached both problems, along with a few pitfalls that surprised me along the way.

1. Why Graph Connectivity Isn't Enough for Strategy Maps

Generating a planar-ish node graph with roads and starting castles takes less than 100 lines of code. Generating a good strategy map is much harder.

In a castle-capture game, tiny topological quirks completely break difficulty pacing:

  • A starting castle with 3 neutral neighbors one hop away snowballs within 15 seconds.
  • A choke point with a single narrow bridge creates a stalemate where neither side can break through without exhausting its economy.
  • Asymmetric distances to high-value neutral castles hand an unfair opening advantage to one faction before any tactical decision happens.

Conquer Clash uses four difficulty tiers (Easy, Medium, Hard, and Insane) with 500 curated maps per tier (2,000 maps total), each keyed by a deterministic map code so two players can replay or race the exact same board.

Instead of trusting geometric heuristics alone, every candidate seed goes through an automated bot-vs-bot simulation harness:

// Simplified seed filter pipeline function evaluateCandidateSeed(seed, targetTier) { const map = generateMapFromSeed(seed); if (!passesTopologyChecks(map)) return null; // Run headless fast-forward matches between calibrated AI policies const results = runHeadlessMatches(map, { runs: 6, playerPolicy: targetTier.baselinePlayerBot, enemyPolicy: targetTier.enemyBot, maxTicks: 3600, }); const winRate = results.wins / results.total; const avgDuration = results.avgTicks; // Reject trivial steamrolls, unwinnable spawns, and endless stalemates if (winRate < targetTier.minWinRate || winRate > targetTier.maxWinRate) { return null; } if (avgDuration < targetTier.minTicks || avgDuration > targetTier.maxTicks) { return null; } return { seed, mapCode: encodeSeed(seed), winRate, avgDuration }; } 

Running headless bot battles caught dozens of subtle deadlocks that static graph metrics missed — especially once castle upgrades entered the loop.

2. Balancing Three Upgrades Without Bloating the UI

Pure troop-count games often devolve into clicking as fast as possible. To add meaningful macro decisions while keeping controls one-tap friendly on mobile and desktop, every captured castle can specialize into one of three upgrades:

  • Town: speeds up troop training on that node.
  • Farm: increases gold income so you can fund more upgrades elsewhere.
  • Fort: boosts defensive strength (roughly 1.6x defender effectiveness) to hold choke points against larger marching stacks.

From a simulation standpoint, that 1.6x Fort multiplier created the trickiest tuning edge case. If an AI bot never builds Forts, frontline bridges collapse instantly; if it spams Forts too early, matches drag on forever. Running the upgrade decision tree through the same headless bot harness let us tune thresholds and also write a concrete Conquer Clash strategy guide backed by actual match behavior rather than guesswork.

3. Zero-Login Friend Rooms for 2–4 Players

Most casual players will gladly click a link from a friend, play two 90-second matches, and close the tab. Almost none of them want to create a username and password first.

For Conquer Clash Play Online, I kept the room lifecycle as thin as possible:

  1. One-click room creation generates a short invite link for 2 to 4 players (each seat gets a distinct animal army — Blue Dogs, Red Foxes, Orange Cats, or Purple Bunnies — so silhouettes and colors stay readable in chaotic mid-game fights).
  2. Honest bot fill-in: if only 2 or 3 friends join, remaining seats are filled by AI opponents explicitly labeled Computer. Fake "human-looking" bot names erode trust immediately; being upfront lets small groups start right away without waiting in a lobby.
  3. Graceful disconnect takeover: browser tabs sleep, mobile connections drop on the subway, and people accidentally refresh. Instead of aborting a 4-player match when one socket drops, a bot smoothly takes over that player's faction until they reconnect.
// Seat state machine for a 2-4 player room type SeatController = | { kind: "human"; socketId: string; connected: true } | { kind: "human-disconnected"; resumeToken: string; fallbackBot: true } | { kind: "computer"; difficulty: "easy" | "medium" | "hard" }; 

That small human-disconnected state with a resumeToken stored in session storage eliminated the worst failure mode of browser multiplayer: one flaky Wi-Fi hiccup ruining a friend match for everyone else.

Takeaways

  • Simulate, don't guess: deterministic seeds + headless bot battles are cheap to run offline and save players from frustrating RNG boards.
  • Map codes are tiny to implement and huge for replayability: once generation is deterministic, exposing the code costs almost nothing.
  • Label bots honestly: players don't mind filling a 2-player room with AI opponents as long as the UI clearly says Computer.

If you want to poke at the map codes, bot pacing, or friend rooms yourself, the game runs free right in the browser with no sign-up at conquerclash.com. I'd be glad to hear how other indie web game devs handle procedural map validation or mobile reconnects!