The gap
Tower defence balance breaks easily: one change to a tower or an enemy can make a map impossible or trivial, and playtesting every map after each change is slow.
Game templates
The complete TypeScript and three.js source of Hedgehold, a short tower defence game: plant four kinds of tower to keep the bugs out of the hedgehog's burrow. Every map is proven fair by a bot.
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
Tower defence balance breaks easily: one change to a tower or an enemy can make a map impossible or trivial, and playtesting every map after each change is slow.
What it is
A finished, tested tower defence game whose maps are proven fair by a bot in seconds, with its towers, enemies and maps in one config file.
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
Title, save key, rules, economy, four towers with three levels, six enemies, maps drawn as text, the daily map, colours and sound.
On every npm test a build-order bot wins all twelve maps and 30 daily maps with three stars, while doing nothing and a two-tower build lose.
Twelve short gardens and a daily map, wave previews, early calls, upgrades and selling, x1/x2 speed, stars and unlocks, landscape and portrait.
48 unit tests and Playwright browser runs, a size budget, an upload zip for itch.io or any static host, and a step-by-step guide to new maps, towers and enemies.
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.