Skip to content
PN Scripts

Game templates

Nightloom Game Template

The complete TypeScript and three.js source of Nightloom, a constellation logic puzzle game: weave threads between stars. A generator and a complete solver make every puzzle unique.

  • 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.

Nightloom in play: glowing stars with numbers on a night sky, single and double threads of light between them

What it solves

The gap

Logic puzzles must have exactly one solution, and checking that by hand for every puzzle is slow and error-prone. Building the game around them takes weeks more.

What it is

A finished, tested logic puzzle whose generator and complete solver keep only unique puzzles, with its look and difficulty curve in one config file.

How you use it

Unzip, run npm ci and npm run dev, then edit src/game.config.ts; npm test re-proves every puzzle.

Source code of a real, playable game to reskin and learn from, with a unique-solution generator built in.

Who it is for

Use it when

  • Publishing your own reskinned logic puzzle (islands, pylons, subway lines) on itch.io, web portals or your site.
  • Learning how to generate unique logic puzzles in TypeScript.
  • Building a branded browser game 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

Title, logo, save key, every colour of the sky, hints, the three-star time, and the difficulty curve: sky size, stars, double threads and loops per puzzle.

Puzzles with one solution

Each sky is grown from a seed and kept only when a complete search finds exactly one solution; the tests also check that the search finished and did not stop at its limit.

A finished game

24 skies and a daily sky, stars by time and hints, undo, remaining counts on each star, a glowing night sky, saves, and layouts for desktop and phones.

Tests and a guide

35 unit tests and Playwright browser runs, a size budget, an upload zip for itch.io or any static host, and a guide with reskin ideas, diagonal or triple threads.

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 Nightloom 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.

Yes: the rules are those of a well-known grid logic puzzle, often called "bridges". The code, art, puzzles and the name Nightloom are our own.

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.