Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
ac0cabde0e
12 changed files with 79 additions and 71 deletions
|
|
@ -5,16 +5,16 @@ Code: GPL-3.0 (see `LICENSE`).
|
||||||
|
|
||||||
## Devvit template
|
## Devvit template
|
||||||
|
|
||||||
The project skeleton comes from Reddit's Devvit template "Bare", © 2025 Reddit Inc., BSD-3-Clause – see
|
The project skeleton comes from Reddit's Devvit template "Bare", © 2025 Reddit Inc., BSD-3-Clause; see
|
||||||
`LICENSE-TEMPLATE.md`.
|
`LICENSE-TEMPLATE.md`.
|
||||||
|
|
||||||
## Music
|
## Music
|
||||||
|
|
||||||
**"Dreamscape (part I)"** by **Vee Ray** – <https://vee-ray.itch.io/dreamscape-part-i>
|
**"Dreamscape (part I)"** by **Vee Ray**: <https://vee-ray.itch.io/dreamscape-part-i>
|
||||||
Licensed under [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/). The modified files (loudness evened
|
Licensed under [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/). The modified files (loudness evened
|
||||||
out, re-encoded) are licensed under CC BY-SA 4.0 as well.
|
out, re-encoded) are licensed under CC BY-SA 4.0 as well.
|
||||||
|
|
||||||
## Graphics
|
## Graphics
|
||||||
|
|
||||||
**"Mini World Sprites"** by **Shade** and **octoshrimpy** – <https://merchant-shade.itch.io/16x16-mini-world-sprites>
|
**"Mini World Sprites"** by **Shade** and **octoshrimpy**: <https://merchant-shade.itch.io/16x16-mini-world-sprites>
|
||||||
Released under [CC0 1.0](https://creativecommons.org/publicdomain/zero/1.0/) (public domain).
|
Released under [CC0 1.0](https://creativecommons.org/publicdomain/zero/1.0/) (public domain).
|
||||||
|
|
|
||||||
8
PLAN.md
8
PLAN.md
|
|
@ -325,3 +325,11 @@ Abgabe: **9. Dezember 2026, 03:00 MEZ**. Eingereicht wird in „Best Daily Game
|
||||||
Tageswechsel lief also ohne Ausnahme. Sonst nur „Telemetry event dropped: event was valid, but Journey telemetry is
|
Tageswechsel lief also ohne Ausnahme. Sonst nur „Telemetry event dropped: event was valid, but Journey telemetry is
|
||||||
not recorded for playtest app versions.“ → **Journeys werden gültig gesendet, aber nur für installierte
|
not recorded for playtest app versions.“ → **Journeys werden gültig gesendet, aber nur für installierte
|
||||||
(Nicht-Playtest-)Versionen gezählt.** Auswertung also erst nach Upload + Installation in r/Ninelands sichtbar.
|
(Nicht-Playtest-)Versionen gezählt.** Auswertung also erst nach Upload + Installation in r/Ninelands sichtbar.
|
||||||
|
|
||||||
|
### 2026-11-14 – Ich-Form, keine langen Gedankenstriche
|
||||||
|
|
||||||
|
- Entscheidung Besitzer: Alle englischen Texte (Devpost, Community-Posts, README, CREDITS, Spiel, Bilder, Trailer) in
|
||||||
|
der **Ich-Form** und **ohne „–“/„—“**: stattdessen Punkt, Komma, Doppelpunkt oder Semikolon; Datumsbereiche als
|
||||||
|
„Dec 1 to Jan 6“. Die Devpost-Überschriften („How we built it“ usw.) sind fest vorgegeben und bleiben.
|
||||||
|
- Deutsche interne Doku und Code-Kommentare bleiben unverändert. Prüfen:
|
||||||
|
`grep -rn '[–—]' src/client src/shared src/server scripts/capture | grep -vE ':\s*(//|\*)'` muss leer sein.
|
||||||
|
|
|
||||||
30
README.md
30
README.md
|
|
@ -1,8 +1,8 @@
|
||||||
# Ninelands – a daily strategy puzzle for Reddit
|
# Ninelands: a daily strategy puzzle for Reddit
|
||||||
|
|
||||||
**Ninelands** is a bite-sized strategy game that lives inside a Reddit post. Every day brings a fresh 9×9 map that is
|
**Ninelands** is a bite-sized strategy game that lives inside a Reddit post. Every day brings a fresh 9×9 map that is
|
||||||
the same for everyone. Build your realm piece by piece, claim lands and gold, chase three stars and climb today's
|
the same for everyone. Build your realm piece by piece, claim lands and gold, chase three stars and climb today's
|
||||||
leaderboard – then compare your realm with the community in the comments.
|
leaderboard, then compare your realm with the community in the comments.
|
||||||
|
|
||||||
It is a port of [Ninelands](https://ninelands.stackteam.at), a strategy board game by StackTeam that runs on the web,
|
It is a port of [Ninelands](https://ninelands.stackteam.at), a strategy board game by StackTeam that runs on the web,
|
||||||
desktop, Android and itch.io. The Reddit edition is a new, focused daily mode built on Devvit Web for the
|
desktop, Android and itch.io. The Reddit edition is a new, focused daily mode built on Devvit Web for the
|
||||||
|
|
@ -11,7 +11,7 @@ _Reddit Game of the Day 2026_ hackathon.
|
||||||
## How to play
|
## How to play
|
||||||
|
|
||||||
1. **Open today's post** and press **Play**.
|
1. **Open today's post** and press **Play**.
|
||||||
2. **Place your castle.** It is free and founds your realm. It claims land in straight lines (up to 5 cells) –
|
2. **Place your castle.** It is free and founds your realm. It claims land in straight lines (up to 5 cells);
|
||||||
nothing can be built on claimed land afterwards.
|
nothing can be built on claimed land afterwards.
|
||||||
3. **Grow your realm.** Every new piece must connect to the land you already hold:
|
3. **Grow your realm.** Every new piece must connect to the land you already hold:
|
||||||
|
|
||||||
|
|
@ -25,7 +25,7 @@ _Reddit Game of the Day 2026_ hackathon.
|
||||||
4. **Earn gold.** Ore (mountains) and herbs (moor) pay 20 gold, every claimed pasture cell 5 (7 in a land with a lake).
|
4. **Earn gold.** Ore (mountains) and herbs (moor) pay 20 gold, every claimed pasture cell 5 (7 in a land with a lake).
|
||||||
Knights pay double. Building costs are deducted.
|
Knights pay double. Building costs are deducted.
|
||||||
5. **Rule lands.** The board is split into 9 lands; you rule a land once you claim at least half of it.
|
5. **Rule lands.** The board is split into 9 lands; you rule a land once you claim at least half of it.
|
||||||
6. **Finish.** The game ends when no move is left – or whenever you press **End game** (tap twice). If no remaining
|
6. **Finish.** The game ends when no move is left, or whenever you press **End game** (tap twice). If no remaining
|
||||||
move earns gold, the game suggests ending.
|
move earns gold, the game suggests ending.
|
||||||
|
|
||||||
Every map has one **law of the realm** that changes the rules a little (e.g. _Costly knights_, _One farm per land_).
|
Every map has one **law of the realm** that changes the rules a little (e.g. _Costly knights_, _One farm per land_).
|
||||||
|
|
@ -38,7 +38,7 @@ explains why a cell does or doesn't fit.
|
||||||
computed from computer games on that very map, so every day and every law is fair.
|
computed from computer games on that very map, so every day and every law is fair.
|
||||||
- **Only your first game counts.** You may play again for practice; it won't change your result.
|
- **Only your first game counts.** You may play again for practice; it won't change your result.
|
||||||
- **Leaderboard:** more stars first, then more gold; on a tie the earlier submission wins. The server replays every
|
- **Leaderboard:** more stars first, then more gold; on a tie the earlier submission wins. The server replays every
|
||||||
submitted game with the same engine and computes gold and stars itself – results cannot be faked.
|
submitted game with the same engine and computes gold and stars itself, so results cannot be faked.
|
||||||
- **Streak:** play the map of the day on consecutive days. Older posts can still be played, but only today's map
|
- **Streak:** play the map of the day on consecutive days. Older posts can still be played, but only today's map
|
||||||
keeps your streak alive.
|
keeps your streak alive.
|
||||||
- **Share** your result line (`Ninelands #12 ★★☆ · 8/9 lands · 85 gold`) and discuss strategies in the comments.
|
- **Share** your result line (`Ninelands #12 ★★☆ · 8/9 lands · 85 gold`) and discuss strategies in the comments.
|
||||||
|
|
@ -56,7 +56,7 @@ explains why a cell does or doesn't fit.
|
||||||
|
|
||||||
1. **Install the app** in your subreddit from its page on developers.reddit.com.
|
1. **Install the app** in your subreddit from its page on developers.reddit.com.
|
||||||
2. **That's it.** On installation the app creates today's post. After that it posts a new map automatically every day
|
2. **That's it.** On installation the app creates today's post. After that it posts a new map automatically every day
|
||||||
at 00:01 UTC – no manual work needed.
|
at 00:01 UTC. No manual work needed.
|
||||||
3. If a daily post is ever missing, open the subreddit's mod menu (⋯) and choose
|
3. If a daily post is ever missing, open the subreddit's mod menu (⋯) and choose
|
||||||
**“Ninelands: create today's post”**. It never creates a duplicate.
|
**“Ninelands: create today's post”**. It never creates a duplicate.
|
||||||
|
|
||||||
|
|
@ -79,21 +79,21 @@ npm run playtest # build, upload and install in the test subreddit
|
||||||
npm run capture # record the catalog assets (video, GIF, stills) into dist/marketing/
|
npm run capture # record the catalog assets (video, GIF, stills) into dist/marketing/
|
||||||
```
|
```
|
||||||
|
|
||||||
- `src/client/` – start screen (`splash`) and game (`game`)
|
- `src/client/`: start screen (`splash`) and game (`game`)
|
||||||
- `src/server/` – endpoints: day state, verified submission, leaderboard, streak, daily post, journeys
|
- `src/server/`: endpoints: day state, verified submission, leaderboard, streak, daily post, journeys
|
||||||
- `src/shared/` – API types and the daily map (seed from the UTC date)
|
- `src/shared/`: API types and the daily map (seed from the UTC date)
|
||||||
- `src/engine/` – the Ninelands engine and board renderer, copied unchanged from a tagged release by
|
- `src/engine/`: the Ninelands engine and board renderer, copied unchanged from a tagged release by
|
||||||
`scripts/sync-engine.sh` (see `src/engine/VERSION`)
|
`scripts/sync-engine.sh` (see `src/engine/VERSION`)
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
|
||||||
- Music: “Dreamscape (part I)” by Vee Ray – CC BY-SA 4.0 (re-encoded)
|
- Music: “Dreamscape (part I)” by Vee Ray, CC BY-SA 4.0 (re-encoded)
|
||||||
- Graphics: “Mini World Sprites” by Shade and octoshrimpy – CC0
|
- Graphics: “Mini World Sprites” by Shade and octoshrimpy, CC0
|
||||||
- Font: Pixelify Sans – SIL Open Font License 1.1
|
- Font: Pixelify Sans, SIL Open Font License 1.1
|
||||||
- Project skeleton: Devvit template “Bare” © Reddit Inc. – BSD-3-Clause
|
- Project skeleton: Devvit template “Bare” © Reddit Inc., BSD-3-Clause
|
||||||
|
|
||||||
Details in [CREDITS.md](CREDITS.md).
|
Details in [CREDITS.md](CREDITS.md).
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
GPL-3.0 – see [LICENSE](LICENSE). The template parts remain under BSD-3-Clause ([LICENSE-TEMPLATE.md](LICENSE-TEMPLATE.md)).
|
GPL-3.0, see [LICENSE](LICENSE). The template parts remain under BSD-3-Clause ([LICENSE-TEMPLATE.md](LICENSE-TEMPLATE.md)).
|
||||||
|
|
|
||||||
|
|
@ -10,13 +10,13 @@ installieren – das legt sofort den Tagespost #1 an. Bilder erzeugen: `npm run
|
||||||
Titel: `How to play Ninelands`
|
Titel: `How to play Ninelands`
|
||||||
|
|
||||||
```text
|
```text
|
||||||
Every day at 00:00 UTC a new 9×9 map appears as a post here. Everyone plays the same map.
|
Every day at 00:01 UTC a new 9×9 map appears as a post here. Everyone plays the same map.
|
||||||
|
|
||||||
**Goal:** earn gold and rule the nine lands.
|
**Goal:** earn gold and rule the nine lands.
|
||||||
|
|
||||||
- **Castle** (free, once): claims up to 5 cells in straight lines.
|
- **Castle** (free, once): claims up to 5 cells in straight lines.
|
||||||
- **Farmer** (free): claims the 8 cells around it, inside its own land. Must border your domain.
|
- **Farmer** (free): claims the 8 cells around it, inside its own land. Must border your domain.
|
||||||
- **Knight** (10 gold): 2 cells straight, stays in its land – pays double.
|
- **Knight** (10 gold): 2 cells straight, stays in its land, pays double.
|
||||||
- **Bishop** (15 gold): 2 cells diagonally, also across borders.
|
- **Bishop** (15 gold): 2 cells diagonally, also across borders.
|
||||||
|
|
||||||
Claimed cells pay gold: ore and herbs 20, pasture 5 (7 next to a lake). Nothing can be built on claimed land, so
|
Claimed cells pay gold: ore and herbs 20, pasture 5 (7 next to a lake). Nothing can be built on claimed land, so
|
||||||
|
|
@ -26,7 +26,7 @@ plan where you build. You rule a land when you claim at least half of it.
|
||||||
**Law of the day:** each map has one special rule, e.g. "Costly knights".
|
**Law of the day:** each map has one special rule, e.g. "Costly knights".
|
||||||
**End game:** when no move earns gold anymore, end the game to keep your gold.
|
**End game:** when no move earns gold anymore, end the game to keep your gold.
|
||||||
|
|
||||||
Only your **first game** counts for the leaderboard – after that you can practice. Play daily for a 🔥 streak;
|
Only your **first game** counts for the leaderboard. After that you can practice. Play daily for a 🔥 streak;
|
||||||
yesterday's winner wears the 👑 flair.
|
yesterday's winner wears the 👑 flair.
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -37,13 +37,13 @@ Titel: `Choose your faction: Kingdom, Orcs and Pirates`
|
||||||
```text
|
```text
|
||||||
Your realm, your look. Tap 🎨 Realm on the daily post:
|
Your realm, your look. Tap 🎨 Realm on the daily post:
|
||||||
|
|
||||||
- **Colours** – red, cyan, green, purple – free for everyone
|
- **Colours**: red, cyan, green and purple, free for everyone
|
||||||
- **Factions** – Kingdom, Orcs (20 ★), Pirates (40 ★)
|
- **Factions**: Kingdom, Orcs (20 ★), Pirates (40 ★)
|
||||||
- **Boards** – Autumn (3-day streak), Winter (7), Night (14)
|
- **Boards**: Autumn (3-day streak), Winter (7), Night (14)
|
||||||
- **Banners** – a new one every 10 stars
|
- **Banners**: a new one every 10 stars
|
||||||
- **Winterfest** (Dec 1 – Jan 6): snowy board and snowflake banner for everyone
|
- **Winterfest** (Dec 1 to Jan 6): snowy board and snowflake banner for everyone
|
||||||
|
|
||||||
Same rules for all – it's just about looking good while you win. Which faction are you playing?
|
Same rules for all. It's just about looking good while you win. Which faction are you playing?
|
||||||
```
|
```
|
||||||
|
|
||||||
## 3 – Go-live (Bildpost: `vimeo-cover.png`, Video als Link)
|
## 3 – Go-live (Bildpost: `vimeo-cover.png`, Video als Link)
|
||||||
|
|
@ -51,15 +51,15 @@ Same rules for all – it's just about looking good while you win. Which faction
|
||||||
In r/Ninelands sind Video-Posts aus (so gewollt). Deshalb das Cover als Bild und den Vimeo-Link zum Trailer in den Text
|
In r/Ninelands sind Video-Posts aus (so gewollt). Deshalb das Cover als Bild und den Vimeo-Link zum Trailer in den Text
|
||||||
(oder `fallback.gif` aus `npm run capture` als bewegtes Bild).
|
(oder `fallback.gif` aus `npm run capture` als bewegtes Bild).
|
||||||
|
|
||||||
Titel: `Ninelands is live – a new 9×9 map every day`
|
Titel: `Ninelands is live: a new 9×9 map every day`
|
||||||
|
|
||||||
```text
|
```text
|
||||||
Ninelands is a small strategy game I've been building – and now there's a daily version right here on Reddit.
|
Ninelands is a small strategy game I've been building, and now there's a daily version right here on Reddit.
|
||||||
|
|
||||||
Every day: one new map, one leaderboard, one first try. Play it in the daily post, compare your realm in the
|
Every day: one new map, one leaderboard, one first try. Play it in the daily post, compare your realm in the
|
||||||
comments, keep your streak going.
|
comments, keep your streak going.
|
||||||
|
|
||||||
Today's map is #1 – good luck, rulers!
|
Today's map is #1. Good luck, rulers!
|
||||||
|
|
||||||
New here? Read "How to play" (pinned). Bugs, ideas or feedback: comment below.
|
New here? Read "How to play" (pinned). Bugs, ideas or feedback: comment below.
|
||||||
|
|
||||||
|
|
@ -68,8 +68,8 @@ Original game: ninelands.stackteam.at
|
||||||
Music: "Dreamscape (part I)" by Vee Ray (CC BY-SA 4.0) · Sprites: "Mini World Sprites" by Shade & octoshrimpy (CC0)
|
Music: "Dreamscape (part I)" by Vee Ray (CC BY-SA 4.0) · Sprites: "Mini World Sprites" by Shade & octoshrimpy (CC0)
|
||||||
```
|
```
|
||||||
|
|
||||||
Hinweise: Kosten in Post 1 sind die normalen (einzelne Gesetze ändern sie). „I've been building“ ist persönlich
|
Hinweise: Kosten in Post 1 sind die normalen (einzelne Gesetze ändern sie). Alle englischen Texte in der Ich-Form und ohne lange
|
||||||
gemeint – als StackTeam „we“ schreiben. Ändern sich Kosten oder Freischaltungen, Bilder neu erzeugen und Texte
|
Gedankenstriche (Entscheidung Besitzer 2026-11-14). Ändern sich Kosten oder Freischaltungen, Bilder neu erzeugen und Texte
|
||||||
anpassen.
|
anpassen.
|
||||||
|
|
||||||
Entscheidung Besitzer (2026-11-13): **keine Post-Flairs** in r/Ninelands, auch nicht für die Tagesposts. Die drei
|
Entscheidung Besitzer (2026-11-13): **keine Post-Flairs** in r/Ninelands, auch nicht für die Tagesposts. Die drei
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ App: developers.reddit.com → `ninelands-game` → Developer Settings → In-ap
|
||||||
|
|
||||||
| Feld | Text | Zeichen |
|
| Feld | Text | Zeichen |
|
||||||
| :-------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------- | :------ |
|
| :-------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------- | :------ |
|
||||||
| Tile tagline | Claim the nine lands – a new map every day. | 43 |
|
| Tile tagline | Claim the nine lands. A new map every day. | 42 |
|
||||||
| Featuring description | A fresh 9×9 map every day. Place your castle, farmers, knights and bishops, claim land and gold, earn three stars and climb today's leaderboard. | 147 |
|
| Featuring description | A fresh 9×9 map every day. Place your castle, farmers, knights and bishops, claim land and gold, earn three stars and climb today's leaderboard. | 147 |
|
||||||
| Description (15–200) | Daily strategy puzzle: one 9×9 map for everyone. Build your realm piece by piece, claim lands and gold, chase three stars and keep your streak alive. | 151 |
|
| Description (15–200) | Daily strategy puzzle: one 9×9 map for everyone. Build your realm piece by piece, claim lands and gold, chase three stars and keep your streak alive. | 151 |
|
||||||
| Game category | Game → Strategy | – |
|
| Game category | Game → Strategy | – |
|
||||||
|
|
@ -40,10 +40,10 @@ Empfehlung (176 Zeichen):
|
||||||
|
|
||||||
Alternativen:
|
Alternativen:
|
||||||
|
|
||||||
- (181) A daily port of the strategy game Ninelands: everyone gets the same 9×9 map each day – build your realm, chase
|
- (179) A daily port of the strategy game Ninelands: everyone gets the same 9×9 map each day. Build your realm, chase
|
||||||
three stars, keep your streak and compare strategies in the comments.
|
three stars, keep your streak and compare strategies in the comments.
|
||||||
- (141) One map. Nine lands. Every day. Build your realm piece by piece, chase three stars and climb today's
|
- (141) One map. Nine lands. Every day. Build your realm piece by piece, chase three stars and climb today's
|
||||||
leaderboard – right inside a Reddit post.
|
leaderboard, right inside a Reddit post.
|
||||||
|
|
||||||
### About the project (Markdown, LaTeX erlaubt)
|
### About the project (Markdown, LaTeX erlaubt)
|
||||||
|
|
||||||
|
|
@ -56,18 +56,18 @@ Alternativen:
|
||||||
|
|
||||||
Ninelands started as a strategy board game on a 9×9 board split into nine lands: you place a castle, farmers,
|
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,
|
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
|
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.
|
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
|
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 we built **Ninelands for Reddit** – a
|
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.
|
focused, bite-sized daily edition that lives inside a post, with the comment thread as the place to compare realms.
|
||||||
|
|
||||||
## What it does
|
## What it does
|
||||||
|
|
||||||
- **One 9×9 map per day, the same for everyone.** A new post appears automatically every day.
|
- **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
|
- **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.
|
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
|
- **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.
|
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
|
- **Leaderboard and streaks.** Only your first game counts. More stars first, then more gold, then the earlier
|
||||||
|
|
@ -81,39 +81,39 @@ focused, bite-sized daily edition that lives inside a post, with the comment thr
|
||||||
- **Devvit Web** with plain TypeScript, bundled by esbuild; no UI framework. An inline start screen in the feed, the
|
- **Devvit Web** with plain TypeScript, bundled by esbuild; no UI framework. An inline start screen in the feed, the
|
||||||
full board in expanded mode.
|
full board in expanded mode.
|
||||||
- **The original engine, untouched.** The Ninelands engine is pure TypeScript (seeded RNG, `legalMoves`,
|
- **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
|
`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.
|
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
|
- **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.
|
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
|
- **Redis leaderboards.** Each day is a sorted set. To rank by stars, then gold, then submission time in a single
|
||||||
score, we use
|
score, I use
|
||||||
|
|
||||||
$$\text{score} = 100\,000 \cdot \text{stars} + \text{gold} + \frac{1}{\text{seq} + 1}$$
|
$$\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
|
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
|
ties, and it makes every score unique, which turns a player's rank into a simple
|
||||||
$\text{rank} = \text{count} - \text{zRank}$.
|
$\text{rank} = \text{count} - \text{zRank}$.
|
||||||
- **First attempt only**, enforced atomically with `hSetNX` – two parallel submissions can never both count.
|
- **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
|
- **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).
|
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.
|
- **Privacy by design:** all user data expires 30 days after a player's last game.
|
||||||
|
|
||||||
## Challenges we ran into
|
## 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.
|
- **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.
|
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
|
- **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. We added an _End game_ button, and the game now
|
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.
|
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
|
- **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.
|
portrait mode. Container queries keep the board as large as possible without pushing the hint line away.
|
||||||
- **Platform details:** a template workflow our CI runner didn't understand, Redis commands that are not enabled for
|
- **Platform details:** a template workflow my CI runner didn't understand, Redis commands that are not enabled for
|
||||||
every app, `localStorage` that is cleared on every app update (so all choices live in Redis), and an analytics router
|
every app, `localStorage` that is cleared on every app update (so all choices live in Redis), and an analytics router
|
||||||
that expects Express while our server has no framework – we rebuilt its five endpoints by hand.
|
that expects Express while my server has no framework, so I rebuilt its five endpoints by hand.
|
||||||
|
|
||||||
## What we learned
|
## What we learned
|
||||||
|
|
||||||
- A daily game lives from **one shared moment**: same map, same day, one first attempt. Every feature we kept serves
|
- 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.
|
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.
|
- 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.
|
- Porting is easiest when the game logic is pure: the engine moved to a new platform without a single change.
|
||||||
|
|
@ -121,7 +121,7 @@ focused, bite-sized daily edition that lives inside a post, with the comment thr
|
||||||
## What's next
|
## What's next
|
||||||
|
|
||||||
- Seasonal events beyond the winter festival, and more unlockable banners and boards.
|
- 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.
|
- 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.
|
- An optional duel against the computer after the daily map.
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -157,8 +157,8 @@ und Freischaltung, 05 Realm, 06 Schluss. Ergänzen lassen sich echte Reddit-Scre
|
||||||
|
|
||||||
| Bild | Caption |
|
| Bild | Caption |
|
||||||
| :------------------- | :--------------------------------------------------------------------------------------------------------- |
|
| :------------------- | :--------------------------------------------------------------------------------------------------------- |
|
||||||
| `00-cover.png` | Ninelands – a daily strategy game on Reddit. One 9×9 map a day, the same for everyone. |
|
| `00-cover.png` | Ninelands: a daily strategy game on Reddit. One 9×9 map a day, the same for everyone. |
|
||||||
| `01-daily-post.png` | The daily post: today's map, its law, three goals, your streak and today's best – one tap to play. |
|
| `01-daily-post.png` | The daily post: today's map, its law, three goals, your streak and today's best. One tap to play. |
|
||||||
| `02-claim-land.png` | Place castle, knights, farmers and bishops to mine gold. A live preview shows what each move earns. |
|
| `02-claim-land.png` | Place castle, knights, farmers and bishops to mine gold. A live preview shows what each move earns. |
|
||||||
| `03-three-stars.png` | One star each for the gold goal, for ruling all nine lands, and for doing both in one game. |
|
| `03-three-stars.png` | One star each for the gold goal, for ruling all nine lands, and for doing both in one game. |
|
||||||
| `04-result.png` | The result card: stars, rank, streak and new unlocks. Post your result to the comments with one tap. |
|
| `04-result.png` | The result card: stars, rank, streak and new unlocks. Post your result to the comments with one tap. |
|
||||||
|
|
@ -173,7 +173,7 @@ Handy an passender Stelle. Keine aktuelle Tageskarte zeigen (Spoiler) und keine
|
||||||
**Vimeo-Beschreibung** (Musik ist CC BY-SA 4.0, Nennung nötig):
|
**Vimeo-Beschreibung** (Musik ist CC BY-SA 4.0, Nennung nötig):
|
||||||
|
|
||||||
```text
|
```text
|
||||||
Ninelands – a daily strategy game on Reddit (Devvit Web). A new 9×9 map every day, one shared leaderboard per
|
Ninelands: a daily strategy game on Reddit (Devvit Web). A new 9×9 map every day, one shared leaderboard per
|
||||||
subreddit, streaks, unlockable realms and your result in the comments. Port of Ninelands (ninelands.stackteam.at).
|
subreddit, streaks, unlockable realms and your result in the comments. Port of Ninelands (ninelands.stackteam.at).
|
||||||
|
|
||||||
Music: "Dreamscape (part I)" by Vee Ray, CC BY-SA 4.0 (re-encoded).
|
Music: "Dreamscape (part I)" by Vee Ray, CC BY-SA 4.0 (re-encoded).
|
||||||
|
|
|
||||||
|
|
@ -124,7 +124,7 @@ function howto(): void {
|
||||||
),
|
),
|
||||||
h(
|
h(
|
||||||
'p',
|
'p',
|
||||||
'Claimed land can’t be built on – plan ahead. Claim half of a land to rule it.',
|
'Claimed land can’t be built on, so plan ahead. Claim half of a land to rule it.',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
h(
|
h(
|
||||||
|
|
@ -214,7 +214,7 @@ function realms(): void {
|
||||||
),
|
),
|
||||||
h(
|
h(
|
||||||
'p.foot',
|
'p.foot',
|
||||||
'It’s all about looking good while you win – which faction are you playing?',
|
'It’s all about looking good while you win. Which faction are you playing?',
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -244,7 +244,7 @@ async function scenes(page, o) {
|
||||||
await stage(
|
await stage(
|
||||||
'caption',
|
'caption',
|
||||||
'One map for the whole subreddit',
|
'One map for the whole subreddit',
|
||||||
'Every day a fresh post – everyone plays the same map.',
|
'A fresh post every day. Everyone plays the same map.',
|
||||||
)
|
)
|
||||||
await wait(1800)
|
await wait(1800)
|
||||||
if (clips.feed && !o.fast) {
|
if (clips.feed && !o.fast) {
|
||||||
|
|
@ -278,7 +278,7 @@ async function scenes(page, o) {
|
||||||
await stage(
|
await stage(
|
||||||
'caption',
|
'caption',
|
||||||
'Every piece claims land',
|
'Every piece claims land',
|
||||||
'Claimed land is gone – plan where you build.',
|
'Claimed land is gone, so plan where you build.',
|
||||||
)
|
)
|
||||||
if (i === 13)
|
if (i === 13)
|
||||||
await stage(
|
await stage(
|
||||||
|
|
@ -300,7 +300,7 @@ async function scenes(page, o) {
|
||||||
await stage(
|
await stage(
|
||||||
'caption',
|
'caption',
|
||||||
'Three goals, three stars',
|
'Three goals, three stars',
|
||||||
'Reach the gold goal, rule the lands – or both.',
|
'Reach the gold goal, rule the lands, or both.',
|
||||||
)
|
)
|
||||||
await wait(1600)
|
await wait(1600)
|
||||||
await o.snap('03-three-stars')
|
await o.snap('03-three-stars')
|
||||||
|
|
|
||||||
|
|
@ -182,8 +182,8 @@ function render(): void {
|
||||||
? h(
|
? h(
|
||||||
'p.practice',
|
'p.practice',
|
||||||
day.loggedIn
|
day.loggedIn
|
||||||
? 'Practice – only your first game counts.'
|
? 'Practice: only your first game counts.'
|
||||||
: 'Playing as guest – log in to join the leaderboard.',
|
: 'Playing as guest. Log in to join the leaderboard.',
|
||||||
)
|
)
|
||||||
: null,
|
: null,
|
||||||
law,
|
law,
|
||||||
|
|
@ -385,7 +385,7 @@ async function finish(): Promise<void> {
|
||||||
disarmEnd()
|
disarmEnd()
|
||||||
update()
|
update()
|
||||||
setHint(
|
setHint(
|
||||||
game.isGameOver() ? 'No move left – the realm is complete!' : 'Game ended.',
|
game.isGameOver() ? 'No move left. The realm is complete!' : 'Game ended.',
|
||||||
'good',
|
'good',
|
||||||
)
|
)
|
||||||
const moves = encodeMoves(game.moves) as EncodedMove[]
|
const moves = encodeMoves(game.moves) as EncodedMove[]
|
||||||
|
|
@ -495,7 +495,7 @@ function showResult(
|
||||||
unlocked.length
|
unlocked.length
|
||||||
? h(
|
? h(
|
||||||
'p.unlocked',
|
'p.unlocked',
|
||||||
`🎁 Unlocked: ${unlocked.join(', ')} – choose it under 🎨 Realm`,
|
`🎁 Unlocked: ${unlocked.join(', ')}. Choose it under 🎨 Realm`,
|
||||||
)
|
)
|
||||||
: null,
|
: null,
|
||||||
rsp ? leaderTable(rsp.top, rsp.result.rank) : null,
|
rsp ? leaderTable(rsp.top, rsp.result.rank) : null,
|
||||||
|
|
@ -517,7 +517,7 @@ function showRules(): void {
|
||||||
h('h2', 'How to play'),
|
h('h2', 'How to play'),
|
||||||
h(
|
h(
|
||||||
'p',
|
'p',
|
||||||
'Place pieces to earn as much gold as possible. Every piece claims land around it – nothing can be built on claimed land. The game ends when no move is left.',
|
'Place pieces to earn as much gold as possible. Every piece claims land around it. Nothing can be built on claimed land. The game ends when no move is left.',
|
||||||
),
|
),
|
||||||
h(
|
h(
|
||||||
'ul',
|
'ul',
|
||||||
|
|
@ -535,13 +535,13 @@ function showRules(): void {
|
||||||
),
|
),
|
||||||
h(
|
h(
|
||||||
'p',
|
'p',
|
||||||
h('b', `Law of the realm – ${lawName(game.trait as WorldTrait)}: `),
|
h('b', `Law of the realm: ${lawName(game.trait as WorldTrait)}. `),
|
||||||
lawText(game.trait as WorldTrait),
|
lawText(game.trait as WorldTrait),
|
||||||
),
|
),
|
||||||
h(
|
h(
|
||||||
'p',
|
'p',
|
||||||
h('b', 'Stars: '),
|
h('b', 'Stars: '),
|
||||||
`reach ${day.goals.gold} gold, rule ${day.goals.lands} lands, or both in one game. Same map for everyone today – only your first game counts.`,
|
`reach ${day.goals.gold} gold, rule ${day.goals.lands} lands, or both in one game. Same map for everyone today, and only your first game counts.`,
|
||||||
),
|
),
|
||||||
h('div.row.end', close),
|
h('div.row.end', close),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ export {shareLine} from '../shared/format.ts'
|
||||||
|
|
||||||
export function leaderTable(rows: LeaderRow[], myRank = 0): HTMLElement {
|
export function leaderTable(rows: LeaderRow[], myRank = 0): HTMLElement {
|
||||||
if (rows.length === 0)
|
if (rows.length === 0)
|
||||||
return h('p.muted', 'No one has played yet – be the first!')
|
return h('p.muted', 'No one has played yet. Be the first!')
|
||||||
const table = h('table.leaders')
|
const table = h('table.leaders')
|
||||||
for (const r of rows) {
|
for (const r of rows) {
|
||||||
const tr = h(
|
const tr = h(
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,7 @@ function showCredits(): void {
|
||||||
h('h2', 'Credits'),
|
h('h2', 'Credits'),
|
||||||
h(
|
h(
|
||||||
'p',
|
'p',
|
||||||
'Ninelands by StackTeam – a daily port of the strategy game Ninelands.',
|
'Ninelands by StackTeam: a daily port of the strategy game Ninelands.',
|
||||||
),
|
),
|
||||||
h(
|
h(
|
||||||
'p',
|
'p',
|
||||||
|
|
|
||||||
|
|
@ -89,9 +89,9 @@ export function placementError(
|
||||||
case 'ZONE_UNIT_LIMIT':
|
case 'ZONE_UNIT_LIMIT':
|
||||||
return 'Law of the realm: this land already has a farmer.'
|
return 'Law of the realm: this land already has a farmer.'
|
||||||
case 'NO_MOTHER':
|
case 'NO_MOTHER':
|
||||||
return 'Place your castle first – it founds your realm.'
|
return 'Place your castle first. It founds your realm.'
|
||||||
case 'IN_ZOI':
|
case 'IN_ZOI':
|
||||||
return 'This land is already claimed – nothing may be built here.'
|
return 'This land is already claimed. Nothing may be built here.'
|
||||||
case 'DOCK_OTHER_ZONE':
|
case 'DOCK_OTHER_ZONE':
|
||||||
return `The ${UNIT_NAME[unit].toLowerCase()} cannot connect here: the neighbouring domain lies in another land.`
|
return `The ${UNIT_NAME[unit].toLowerCase()} cannot connect here: the neighbouring domain lies in another land.`
|
||||||
case 'NOT_DOCKED':
|
case 'NOT_DOCKED':
|
||||||
|
|
@ -108,15 +108,15 @@ export function placementError(
|
||||||
/** Kurze Hinweise im Spiel statt einer Textwand (Jury: „contextual hints“) */
|
/** Kurze Hinweise im Spiel statt einer Textwand (Jury: „contextual hints“) */
|
||||||
export const HINTS = {
|
export const HINTS = {
|
||||||
castle:
|
castle:
|
||||||
'Tap a cell to place your castle. It claims land in straight lines – nothing can be built on claimed land later.',
|
'Tap a cell to place your castle. It claims land in straight lines. Nothing can be built on claimed land later.',
|
||||||
farmer:
|
farmer:
|
||||||
'Farmers are free: place one right next to your claimed land, in the same land. Pasture pays 5 gold per cell.',
|
'Farmers are free: place one right next to your claimed land, in the same land. Pasture pays 5 gold per cell.',
|
||||||
general:
|
general:
|
||||||
'Ore ⛰ and herbs 🌿 pay 20 gold. Knights pay double. Keep going until no move is left.',
|
'Ore ⛰ and herbs 🌿 pay 20 gold. Knights pay double. Keep going until no move is left.',
|
||||||
touch: 'Tap again to place.',
|
touch: 'Tap again to place.',
|
||||||
noGain:
|
noGain:
|
||||||
'None of your remaining moves earns gold – end the game to keep your gold.',
|
'None of your remaining moves earns gold. End the game to keep your gold.',
|
||||||
allStars: 'All 3 stars! Keep going for more gold – or end the game.',
|
allStars: 'All 3 stars! Keep going for more gold, or end the game.',
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export {starsLine} from '../shared/format.ts'
|
export {starsLine} from '../shared/format.ts'
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ export function unlockText(u: Unlock): string {
|
||||||
case 'stars':
|
case 'stars':
|
||||||
return `${u.stars} ★`
|
return `${u.stars} ★`
|
||||||
case 'winterfest':
|
case 'winterfest':
|
||||||
return 'Dec 1 – Jan 6'
|
return 'Dec 1 to Jan 6'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue