Skip to content
PN Scripts

Game templates

Snugholm Game Template

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.

  • TypeScript
  • three.js
  • Vite 8
  • Web Audio
  • Vitest and Playwright
  • Coming soon

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.

Snugholm in play: a small island with cottages, fields and ponds, the hand of building cards and score previews on the board

What it solves

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.

Who it is for

Use it when

  • Publishing your own cozy builder puzzle (a farm, a harbour, a space colony) on itch.io, web portals or your site.
  • Learning data-driven scoring rules and bot-based map tuning in TypeScript.
  • Building a calm branded puzzle for a client.

Built for

  • Web and indie game developers who know some TypeScript.
  • Studios and freelancers who make branded browser games.

What you get

One config file

Buildings with their scoring rules as data, maps as text, decks, seeds, star scores, the daily map, colours and sound.

Maps with a proof

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.

A finished game

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.

Tests and a guide

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.

Specs

Availability
Coming soon
Vendor
PN Scripts
Type
Template
Platforms
JavaScript
Pricing
One-time purchase Price to be announced.
License
PN Scripts Template Licence 1.0
Deployment
Download (ZIP of source code)
Maturity
v1.0.0

Compatibility

Platform or runtime Supported versions Tested up to
Node.js 22.12 or newer Not stated

Stack

  • TypeScript
  • three.js
  • Vite 8
  • Web Audio
  • Vitest and Playwright

The Snugholm template is coming soon

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.

Questions

Make and sell any number of your own games from it, and build games for clients. You may not resell or share the source code itself (PN Scripts Template Licence 1.0).

Node.js 22.12 or newer and some TypeScript. Google Chrome runs the browser tests.

No ad or portal SDK, and English only. It is tested in desktop Chrome and Chrome's Pixel 7 emulation, not yet on iOS Safari, Firefox or a real phone.

The code was written with AI assistance and checked by PN Scripts with automated tests. All visuals and sounds are generated by code; there are no AI-generated image or audio files.

It is not on sale yet. When it is, this page will link to the store; PN Scripts does not take payment on this site.