Urgent.News

What's breaking now, across hundreds of outlets.

Tech

Stress-Testing 2,000 Procedural Strategy Maps with Bots and Building Zero-Login Friend Rooms

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…

Real-time strategy games, from Galcon to modern browser castle conquest games, might appear simple at first glance. Players navigate a graph of interconnected castles, deploying troops that regenerate over time and marching armies between nodes. During my development of Conquer Clash, I encountered two engineering challenges that seemed straightforward until they were exposed to real players: procedural maps often yielded unwinnable or dull layouts if not validated beyond basic graph connectivity, and casual browser multiplayer faltered when requesting an account or left a friend room with only two or three players. Here's how I tackled these issues, along with some unforeseen complications.

Generating a strategic map from a graph of nodes and roads is relatively easy. However, crafting an engaging strategy map presents significant challenges. Tiny topological quirks, such as a starting castle flanked by three neutral neighbors just one hop away, can escalate the difficulty within 15 seconds. Narrow bridges in choke points create stalemates where neither side can break through without exhausting their resources.

Asymmetric distances to high-value neutral castles inadvertently provide an unfair opening advantage to one faction before any strategic decisions are made.

To ensure map quality, Conquer Clash employs four difficulty tiers—Easy, Medium, Hard, and Insane—with 500 curated maps per tier, totaling 2,000 maps. Each map is associated with a deterministic map code, allowing two players to replay or race through the exact same board. Rather than relying solely on geometric heuristics, every candidate seed undergoes an automated bot-vs-bot simulation process.

The pipeline involves: generating a map from the seed, checking if it passes topology checks, running headless fast-forward matches between calibrated AI policies, and evaluating the win rate and average duration. Seeds that result in trivial steamrolls, unwinnable spawns, or endless stalemates are discarded.

Balancing three upgrades—Town (speeding up troop training), Farm (increasing gold income), and Fort (enhancing defensive strength)—without overwhelming the user interface required careful tuning. A 1.6x Fort multiplier posed a significant tuning edge case. If AI bots never built Forts, frontline bridges would collapse instantly; if they built Forts too early, matches would drag on indefinitely.

By running the upgrade decision tree through the same headless bot harness, we could fine-tune thresholds and create a concrete Conquer Clash strategy guide based on actual match behavior rather than guesswork.

For zero-login friend rooms, allowing casual players to join a link from a friend and play two 90-second matches before closing the tab was crucial. The room lifecycle was kept as thin as possible: one-click room creation generates a short invite link for 2 to 4 players, each with a distinct animal army. If fewer than four players join, the remaining seats are filled by AI opponents explicitly labeled "Computer."

Being upfront about AI opponents avoids eroding trust. In case of browser tab sleep, mobile connection drops, or accidental refreshes, instead of aborting the match, a bot seamlessly takes over the disconnected player's faction until they reconnect. This approach eliminated the worst failure mode of browser multiplayer: one flaky Wi-Fi hiccup ruining the experience for everyone else.

In summary, simulated validation through deterministic seeds and headless bot battles proved invaluable in catching subtle deadlocks missed by static graph metrics. Exposing map codes through deterministic generation provided replayability without significant implementation costs. Honesty regarding bot fill-in for friend rooms maintained user trust, and a graceful disconnect takeover prevented entire matches from collapsing due to isolated player disruptions.

The game is freely accessible online at conquerclash.com, inviting other indie web game developers to explore procedural map validation and mobile reconnect features.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in Tech

I rented an H100 to find out what a shared API was hiding

$13.80 of GPU time · a practical exercise from Chapter 4 of Inference Engineering I'm currently reading Inference Engineering by Philip Kiely (Baseten, 2026), and I'm doing every chapter hands-on, not…

  • User rented H100 GPU to test shared API impact on inference model
  • 149 tokens/sec achieved on H100, only 21 tokens/sec through OpenRouter
  • OpenRouter hid performance details, batching improved output 40×

Ted Cruz Blames China for Data Center Water Fears: 'You're Being Lied To'

The Texas Republican claimed China-backed influence operations have helped rapidly shift public opinion against data centers.

  • Ted Cruz claims China funds misinformation about data centers' water consumption.
  • Texas hosts over 400 AI data centers consuming 25 billion gallons of water annually.
  • Cruz argues newer data centers use less water than golf courses.

More from Friday 27 November →