The gap
Tile-placement puzzles need scoring rules, card text and star targets that agree and stay fair; tuning them by playing every map after each change is slow.
Game templates
The complete TypeScript and three.js source of Snugholm, a cozy tile-placement puzzle: build a tiny village where every tile scores by its neighbours. A bot proves every map.
Coming soon
Not published on its store yet, so there is no buy or download link. PN Scripts does not take payment for it here.
The gap
Tile-placement puzzles need scoring rules, card text and star targets that agree and stay fair; tuning them by playing every map after each change is slow.
What it is
A finished, tested village puzzle whose rules are data, whose card text is generated from them and whose maps a bot proves fair.
How you use it
Unzip, run npm ci and npm run dev, then edit src/game.config.ts; npm test checks the game again in seconds.
Source code of a real, playable game to reskin and learn from, with its proofs built into the tests.
Use it when
Built for
Buildings with their scoring rules as data, maps as text, decks, seeds, star scores, the daily map, colours and sound.
On every npm test a greedy bot that sees only what the player sees reaches three stars on every map and 30 daily maps, while random play stays at one star.
Twelve islands, a daily map, eight buildings introduced one by one, a live score preview, unlimited undo, resume after reload and a village that comes alive.
56 unit tests and Playwright browser runs, a size budget, an upload zip for itch.io or any static host, and a guide to adding buildings and maps.
1 of 3
| Platform or runtime | Supported versions | Tested up to |
|---|---|---|
| Node.js | 22.12 or newer | Not stated |
The template is finished and tested. It is not on sale yet; this page will say where to get it when it is.
Coming soon
Not published on its store yet, so there is no buy or download link. PN Scripts does not take payment for it here.