Inspiration

I've been obsessed with strategy war games my whole life — Clash of Clans, Age of Empires, Risk, StarCraft. The thing that makes them addictive isn't just the battles. It's the anticipation. Building your defenses, studying your enemy, knowing the attack is coming and wondering if you're ready.

Reddit already has that energy naturally. Every subreddit is a community with its own identity, its own rivalries, its own inside jokes. I kept thinking — what if that community energy became an actual war game? What if the comment section wasn't just talking about strategy but WAS the strategy? What if getting raided by another redditor sent you a real Reddit notification that made you drop everything and log back in for revenge?

That's Zone Kings. A fort-building war game that lives entirely inside Reddit — where the community IS the army, the comment section IS the war room, and the Zone King throne is worth fighting for every single day.

What It Does

Zone Kings is a persistent fort-building war game running inside a Reddit post. No downloads. No accounts. Just open the post and start building your empire.

🏗️ Build Your Fort

Every player gets a personal 5×5 grid to construct their fort. You have 10 structure types to choose from, each with 3 upgrade levels:

  • 🧱 Wall — Your first line of defense. Stack them to create kill zones
  • 💣 Cannon — Raw firepower. More cannons = more damage every battle round
  • 🏹 Archer Tower — Balanced attack and defense. The backbone of any fort
  • 🎯 Ballista — High precision, penetrates enemy walls to hit structures behind
  • ⚡ Spikes — Passive damage to anyone who attacks you
  • 💥 Trap — Hidden explosive. Devastating on first hit but single use
  • 🛡️ Shield — Absorbs multiple hits before breaking
  • 🪨 Catapult — Hits the enemy's FRONT ROW first, destroying their best defenses
  • 🗼 Watchtower — Reveals hidden enemy structures before battle
  • 🏥 Medic Tent — Repairs your fort HP every battle round

Grid positioning actually matters. Walls placed next to cannons give them +2 DEF each. Catapults always hit front rows first — so smart players hide their cannons deep in the grid. This isn't just "buy the strongest stuff" — it's chess with cannons.

⚔️ Battle Royale — Every Cycle

When the battle phase hits, every fort in the zone fights simultaneously. It's not 1v1 — it's a full battle royale. Last fort standing wins.

Before battle you choose your stance:

  • Aggressive — +25% ATK, -15% DEF. All or nothing
  • Defensive — +25% DEF, -15% ATK. Turtle and survive
  • Focus — Target the strongest enemy or snipe their deadliest structure

Battles run in animated rounds — cannonballs arc across the screen, explosions bloom in orange and yellow, walls crack and crumble, forts collapse into rubble. Every battle is saved permanently and replayable at 1× or 3× speed. Judges from Week 1 can still watch the very first battle that ever happened.

👑 Zone King — Real Power, Real Stakes

This is what makes Zone Kings different from every other game. Winning isn't just a trophy. The Zone King gets real mechanical advantages:

  • +3 build points per cycle — build faster than everyone else
  • +15% effective defense in both battles AND raids
  • Double daily check-in bonus — passive income advantage
  • Crown badge displayed on their fort everywhere it appears on the map

This means the king has a real reason to keep playing and defend their crown. Everyone else has a real reason to dethrone them. The throne creates permanent conflict — which is exactly what keeps a community coming back.

🗡️ Raids — Direct PvP Anytime

You don't have to wait for battle day to attack. Raid any rival directly, anytime.

The raid system has real decision depth:

  1. Choose your target (sorted by fair matchup — closest power score)
  2. Pick your opening strike mid-raid:
    • Sabotage Weapons — reduces enemy ATK by 15% for this raid
    • Breach Walls — reduces enemy DEF by 20% for this raid
  3. Win → take trophies and steal their build points
  4. Lose → your fort is protected from farming until you repair

The revenge mechanic is my favorite part. Whoever raided you last is highlighted as a one-tap revenge target paying 1.5× trophies. Getting hit doesn't make you quit — it makes you come back angrier. That's the hook.

📬 Reddit-Native Notifications

Every raid result is posted as a comment that @mentions the defender. Reddit's own notification system fires — the little orange notification badge. You don't even need to be in the app. Reddit itself reminds you that someone just sacked your fort and you need to get back in there.

This is something only a Reddit game can do. It turns Reddit's own infrastructure into a retention engine.

🗺️ Multi-Zone World Map

The game isn't one zone — it's a world of zones, each with their own independent cycle, their own king, and their own leaderboard. Players are auto-assigned to zones. Locked zones tease future expansion. Each zone has its own identity and its own drama.

🤝 Alliances

Form mutual opt-in pacts with other players. Allies can't raid each other. This creates diplomacy meta-game in the comments — negotiating alliances, backstabbing former allies when the cycle gets competitive. Pure Reddit energy.

📜 Hall of Kings

Every Zone King is recorded forever. Name, fort name, battle score, reign dates. A permanent record of everyone who ever ruled. The best players build legacies here — win enough cycles and you climb from Zone King to Warlord to Eternal King.

How We Built It

Tech stack:

  • Devvit Web — Reddit integration, post creation, flair assignment, scheduler, mod menu tools
  • Phaser 4 — all game rendering, battle animations, fort builder, world map, everything visual
  • Hono + tRPC — backend API layer running on Devvit's server
  • Redis — complete persistent game state, fort data, battle history, leaderboards, raid logs, alliance data
  • React — splash screen preview shown in Reddit feed
  • Web Audio API + MP3 — sound effects and scene-aware battle music (plays only during battles and raids, gated by autoplay unlock)
  • 100% procedural art — zero image assets. Every sprite, every building, every explosion drawn in code with Phaser Graphics

Engineering highlights that I'm proud of:

The lazy self-healing server pattern was the most important architecture decision. Battles, cycle rollovers, and raid resolutions all resolve ON-READ with idempotency guards. The game is never in a broken state even if Devvit's cron fires late or skips entirely. Correctness never depends on a scheduler.

Permanent battle replays was harder than it sounds. Each replay stores a complete snapshot of every combatant's cosmetics at battle time. When you replay a battle from 3 cycles ago, you see the forts exactly as they were — even though those forts have been rebuilt and modified since. The snapshot survives cycle rollovers that wipe live fort data.

Height-aware responsive layout eliminated an entire class of mobile bugs. Every screen measures actual available space and computes all positions from that — nothing is hardcoded. Text is clamped by measurement. This is why the game looks right on a phone screen AND a desktop popup.

Challenges We Faced

Devvit's environment is unusual. The game runs in a sandboxed webview inside Reddit's app with strict CORS policies, no localStorage, no external CDN assets, limited network access. Every image had to be drawn in code. Every audio file had to be bundled. Every API call goes through Devvit's proxy.

Long usernames broke fort building. Auto-generated fort names were overflowing a 16-character Redis key cap silently blocking all building for affected users. Debugging silent failures in a live Reddit environment with no console access was genuinely hard.

King privilege checks were killing performance. The initial implementation checked king status per-fort, creating O(n) sequential Redis round-trips per zone load. Collapsed to one shared zone-king lookup per batch — zone loads went from 3-4 seconds to under 500ms.

The battle replay loss bug took 3 days to find. Cycle rollovers were overwriting the Redis keys that stored battle results. The fix was separating live cycle data from permanent battle archive data with different key namespaces.

What We Learned

Building a real multiplayer game for Reddit is fundamentally different from building a website. You're working WITH Reddit's infrastructure — its notification system, its flair system, its comment system — not just hosting a game inside a Reddit post. The best features (raid notifications, king flair, comment-posted results) are the ones that feel most native to Reddit itself.

The lazy self-healing pattern is something I'll use in every Devvit project going forward. Never trust a scheduler. Always resolve on-read.

Most importantly: the hook isn't the game mechanic. The hook is the emotion. The anxiety of knowing your fort is vulnerable while you sleep. The revenge impulse when you get raided. The pride of seeing your name in the Hall of Kings. Design for those emotions and the retention takes care of itself.

What's Next

  • Seasonal tournaments — 30-day seasons with exclusive Eternal King flair
  • Zone wars — subreddit vs subreddit battles across zones
  • Fort sharing — export your fort layout for others to study and copy
  • Trading post — spend trophies for rare structures
  • Mobile-optimized battle cinematics with Phaser particle systems

Zone Kings was built for the Reddit Games With a Hook Hackathon 2026. Every line of code written in 13 days. Every sprite drawn in code. Every feature designed to answer one question: why would someone open Reddit tomorrow specifically because of this game?

Built With

Share this project:

Updates