-
-
Ninelands – a daily strategy game on Reddit. One 9×9 map a day, the same for everyone.
-
The daily post: today's map, its law, three goals, your streak and today's best – one tap to play.
-
Place castle, knights, farmers and bishops to mine gold. A live preview shows what each move earns.
-
The result card: stars, rank, streak and new unlocks. Post your result to the comments with one tap.
-
One star each for the gold goal, for ruling all nine lands, and for doing both in one game.
-
Your realm: colours, factions, boards and banners, unlocked by stars and streaks. Same rules for everyone.
-
A new map every day at 00:01 UTC on r/Ninelands. A port of Ninelands (ninelands.stackteam.at).
Inspiration
Ninelands started as a strategy board game on a 9×9 board split into nine lands: you place a castle, farmers, knights and bishops, every piece claims land, and the goal is to rule the nine lands. It runs on the web, desktop, Android and itch.io, and its most popular mode has always been the map of the day, where everyone plays the same map and compares results.
Reddit felt like the natural home for that mode. A daily map is a shared puzzle, and a shared puzzle wants a place to talk about it: Where did you put your castle? How did you get 9/9 lands? So I built Ninelands for Reddit: a focused, bite-sized daily edition that lives inside a post, with the comment thread as the place to compare realms.
What it does
- One 9×9 map per day, the same for everyone. A new post appears automatically every day.
- Easy to start, hard to master. Tap to preview what a piece would claim and how much gold it brings; tap again to place it. The line below the board explains why a cell fits or not. No wall of rules.
- Three stars per map: reach the gold target, rule the lands target, and both in one game. Targets come from computer games on that very map, so every day is fair.
- Leaderboard and streaks. Only your first game counts. More stars first, then more gold, then the earlier submission.
- Your realm. Unlock board themes with your streak and new banners and factions (orcs, pirates) with your stars.
- Reddit-native. Post your result to the comments with one tap, earn a 🔥 streak flair, and the best player of the day wears 👑 Ruler of the day the next day.
How we built it
- Devvit Web with plain TypeScript, bundled by esbuild; no UI framework. An inline start screen in the feed, the full board in expanded mode.
- The original engine, untouched. The Ninelands engine is pure TypeScript (seeded RNG,
legalMoves,applyMove, replay). A sync script copies it, plus the SVG board renderer, from a tagged release, so the Reddit edition plays exactly like the original and fixes flow in one direction only. - A server that trusts nothing. The client sends only its moves. The server replays them with the same engine and computes gold, lands and stars itself, so results cannot be faked.
- Redis leaderboards. Each day is a sorted set. To rank by stars, then gold, then submission time in a single score, I use
$$\text{score} = 100\,000 \cdot \text{stars} + \text{gold} + \frac{1}{\text{seq} + 1}$$
where $\text{seq}$ is the running number of the submission. The fraction lies in $$(0, \tfrac12]$$, so it only breaks ties, and it makes every score unique, which turns a player's rank into a simple $$\text{rank} = \text{count} - \text{zRank}$$.
- First attempt only, enforced atomically with
hSetNX: two parallel submissions can never both count. - Daily posts via the Devvit scheduler, Devvit Journeys for analytics (journey starts when the castle is placed, a progress event per star, the end carries the gold as score).
- Privacy by design: all user data expires 30 days after a player's last game.
Challenges we ran into
- Making the daily map unspoilable. The website has a map of the day too, including a replay of the best game. The Reddit edition therefore uses its own seed, so its daily map can never be looked up elsewhere.
- Knowing when to stop. In the original, a game ends when no move is left. On a phone that can drag on, especially under the law One farm per land, where only costly knights remain. I added an End game button, and the game now detects when no remaining move earns gold and suggests ending.
- Fitting a strategy board into a post. The board, the goals and nine piece costs have to be readable on a phone in portrait mode. Container queries keep the board as large as possible without pushing the hint line away.
- Platform details: a template workflow my CI runner didn't understand, Redis commands that are not enabled for
every app,
localStoragethat is cleared on every app update (so all choices live in Redis), and an analytics router that expects Express while my server has no framework, so I rebuilt its five endpoints by hand.
What we learned
- A daily game lives from one shared moment: same map, same day, one first attempt. Every feature I kept serves that moment; menus and settings did not make the cut.
- Contextual hints beat tutorials. Showing why a move doesn't fit teaches the rules faster than any rules screen.
- Porting is easiest when the game logic is pure: the engine moved to a new platform without a single change.
What's next
- Seasonal events beyond the winter festival, and more unlockable banners and boards.
- A weekly challenge with a twist (fog of war, bandit camps); both already exist in the original engine.
- An optional duel against the computer after the daily map.
Ported from Ninelands: what's new
Ninelands for Reddit is a port. I own the original game, Ninelands, a strategy board game I made and publish under StackTeam on the web, desktop, Android and itch.io.
Everything Reddit-specific was built during the hackathon, starting November 11, 2026, as a new codebase on Devvit Web:
- the inline start screen, the expanded game view and the realm view, designed for a phone inside a post
- a new daily mode with its own seed, a daily post by the scheduler and goals computed on the server
- a server-verified leaderboard (every game is replayed), first attempt only, and streaks
- realm unlocks (factions, boards, banners, a winter festival), streak and crown flair, the result as a comment, and Devvit Journeys
- contextual hints and an "End game" suggestion when no move earns gold anymore
Reused without changes: the game engine and board renderer (copied from release v0.11.0 of the original), the sprites (CC0) and the music (CC BY-SA 4.0).
How to test
- Open r/Ninelands and tap the newest Ninelands #N post. A new one appears every day at 00:01 UTC.
- Press Play. Place your castle first: tap a cell to see a preview, tap again to place. The line under the board explains every move, and ? shows the rules.
- Finish the game, or press End game (tap twice). The result card shows stars, rank, streak and new unlocks.
- Tap 💬 Post to comments to post your result under the daily post, in your name.
- Tap 🎨 Realm on the post to change colour, faction, board and banner.
Only your first game of a day counts; play again to practice. Log in to Reddit to join the leaderboard. Some things show over several days: the 🔥 streak flair from day 2, the 👑 crown for yesterday's winner, and unlocks from collected stars. Older daily posts stay playable. Best on a phone, desktop works too.
Built With
- biome
- css3
- devvit
- devvit-journeys
- devvit-scheduler
- devvit-web
- esbuild
- ffmpeg
- html5
- javascript
- node.js
- pixel-art
- playwright
- redis
- svg
- typescript