JS-modules

Small, dependency-free pieces for single-file browser games and interactive stories, taken from Apple Press, Fancy, the Banana and the Story Editor. Open a demo, then copy the file you need. Source and docs on GitHub.

An entry's name opens its live demo. Sizes are the plain files you copy, before minifying. Module docs list limits and the closest existing open-source project.

Modules & Tools (38)

Small pieces for single-file games and apps, and the tools that build and test them. Tools are not shipped inside a game.

Device and browser adaptation

Make a game behave on slow phones, privacy-focused browsers and power-saving screens.

Saving and data safety

Keep a player's progress safe and let them move it between devices.

Games - Looks and effects

Curtains, flying elements, lettering and 3D-looking sprites.

Games - Controls

Let players hold a button, or play with a gamepad.

Games - Assist

Show a new player around, and keep small children away from the buttons that matter.

Games - Math

The numbers behind idle and clicker games.

Games - Testing

Test a game by playing it at random, shrinking any failure to a short replay, counting what it draws and driving real browsers.

App - Efficiency

Keep a one-file app small and light: smaller data in memory, smaller pages on the wire.

Model simulation

Simulate random walkers over a graph.

Visualization

Draw maps, flow charts and animated pictures from data.

Size and packaging

Open zip and Excel files safely, and pack a finished page into a smaller file that unpacks itself.

Story editor packages (10)

Packages for interactive stories, kept with the Story Editor they are cut from (source). Each is MIT-licensed, has no dependencies, and runs in Node 18+ or a browser.

Story data

Create, clean, import and save stories in one shared file format.

Story validation

Find dead ends and endings nobody can reach before a reader does.

Story flow

See a story's shape: maps of its pages and simulated readers.

Story build and distribute

Turn a story into a game, or play it from code or a terminal.

Story packaging

Pack a finished story page into a smaller page.

Story testing

Run tests on stock Firefox, generate random stories and keep two implementations in step.

AI knowledge base (1)

Written processes for working with an AI helper, kept with the Story Editor.

Working with an AI helper

A written process for a person and an AI assistant building software together.