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 (49)
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.
- env-probes 1.1.0 ยท API 1: Detects privacy modes that round timers (including Firefox's 16.67 ms clock), scramble canvas read-back or block storage, and says what it found in plain words. global
EnvProbesยท 16.2 KB ยท docs - frame-kit 1.2.1 ยท API 1: Frame pacing for canvas games: even-dt smooths the frame time, quality-governor steps effects down and back up, job-pump spreads heavy jobs across frames, frame-meter shows frames a second, hitches and tap delay in plain words. global
EvenDt,QualityGovernor,JobPump,FrameMeterยท 38.9 KB ยท docs - field-report 1.0.2 ยท API 1: Two hidden buttons for a game or app: five taps in a corner open a panel that saves a speed report (start-up, frames a second, slowest frames, heavy tasks, plain verdict) and an error log, as small Markdown files. No network. global
FieldReportยท 21.3 KB ยท docs - fx-governor 1.1.1 ยท API 1: Steps visual effects down when the device cannot keep up; never back up behind the player. global
FxGovernorยท 6.2 KB ยท docs - image-decode 1.2.2 ยท API 1: Loads PNG, JPEG, WebP and AVIF pictures so the page does not freeze when they are first drawn: picks the right off-thread way for each browser, loads a list in order, and tells whether the browser can read WebP or AVIF. global
ImageDecodeยท 22.0 KB ยท docs - slow-note 1.0.0 ยท API 1: Keeps a short note, only on the device, of the errors, slow taps and long frames a page had; copyable as plain text, nothing is sent anywhere. global
SlowNoteยท 9.7 KB ยท docs
Saving and data safety
Keep a player's progress safe and let them move it between devices.
- save-kit 1.2.2 ยท API 1: Safe localStorage saves, backup slot, checksummed copy-paste save codes with a size limit on what a paste may unpack to. global
SaveKitยท 26.6 KB ยท docs - tab-guard 1.1.1 ยท API 1: Keeps one open copy of a page in charge (Web Locks), so two tabs do not overwrite each other's saved data, and tells the game when the other copy closes. global
TabGuardยท 9.6 KB ยท docs
Games - Looks and effects
Curtains, flying elements, lettering and 3D-looking sprites.
- cartoon-3d-kit 1.3.0 ยท API 1: A written style guide plus demo for the soft, glossy cartoon 3D look done in plain CSS and SVG. no script, a style guide ยท docs
- fly-to-mini 1.2.0 ยท API 1: A big element scrolls away and a copy flies to its sticky mini version (and back). global
FlyToMiniยท 18.1 KB ยท docs - gpu-blur 1.0.0 ยท API 1: Blurs a picture (a canvas, an ImageBitmap or RGBA bytes) on the graphics card with WebGL 2, or in WebAssembly, or in plain JavaScript, whichever the device does best; every way gives the same picture, and a big blur never freezes the page. global
GpuBlurยท 37.4 KB ยท docs - sprite-baker 1.7.1 ยท API 1: Tiny software 3D rasterizer that bakes shaded sprites to canvases once at load, or one frame per tick; also makes silhouette masks and packs sprite sheets. Optional WebAssembly fill add-on (same pixels, about 1.1 to 1.4 times faster baking in Chromium and Firefox). global
SpriteBakerยท 54.6 KB ยท docs - stage-curtains 1.4.0 ยท API 1: Velvet stage curtains that slide shut over a page, then fly open; the velvet is painted by a small WebAssembly loop with plain JavaScript as the fallback. global
StageCurtainsยท 46.2 KB ยท docs - sticker-text 1.1.0 ยท API 1: Die-cut sticker lettering in plain CSS text-shadow rings, no images. global
StickerTextยท 5.0 KB ยท docs
Games - Controls
Let players hold a button, or play with a gamepad.
- back-close 1.2.0 ยท API 1: Makes the phone back swipe or back button close the top panel instead of leaving the page (CloseWatcher, with an opt-in history fallback for browsers without it). global
BackCloseยท 9.1 KB ยท docs - hold-press 1.1.0 ยท API 1: Hold-to-repeat for buttons that survives Android Chrome pointercancel. global
HoldPressยท 13.0 KB ยท docs - wake-keeper 1.1.0 ยท API 1: Keeps the screen awake only while a game wants it: released on pause, hidden tab and idle, asked again when allowed, no retry storms. global
WakeKeeperยท 8.2 KB ยท docs
Games - Assist
Show a new player around, and keep small children away from the buttons that matter.
- grown-ups-door 1.0.0 ยท API 1: A hold-then-drag task a young child will not finish, in front of the buttons and links a grown-up should press (a speed bump, not security). global
GrownUpsDoorยท 14.8 KB ยท docs - spotlight-tour 1.1.1 ยท API 1: A first-time tour: one dimmed layer, a bright window over the current part, Skip and Back, remembers who saw it and gives a finishing gift once. global
SpotlightTourยท 12.8 KB ยท docs
Games - Math
The numbers behind idle and clicker games.
- graph-walk 0.1.0 ยท API 0: Breadth-first distances and depth-first loop marking over a links-of-every-item layout in typed arrays, with no recursion. Same answers as Netflow Map's inline walks. global
GraphWalkยท 4.0 KB ยท docs - idle-core 1.2.0 ยท API 1: Tested maths for idle/clicker games: costs, buy-many and buy-max, milestones, away income, boost queue, number format. global
IdleCoreยท 22.8 KB ยท docs
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.
- canvas-probe 1.1.1 ยท API 1: Test-build counter for canvas 2D games: calls per frame, save/restore leaks, overhanging drawImage sources, draws below half size, style-write repeats, painted area.
- firefox-stand-in 1.1.0 ยท API 1: Runs a Playwright-for-Python test in stock Firefox (through Selenium and geckodriver) without rewriting it; says plainly which calls it supports and stops with a clear message on the rest.
- fuzz-kit 1.3.4 ยท API 1: Seeded, reproducible random-input fuzzer engine with weighted operations, invariants, liveness checks and failure shrinking; Playwright and Puppeteer runners with real input and CPU throttling; stock-Firefox recipe; test-hook stripper.
- speed-guard 1.0.0 ยท API 1: One command that says whether a release got slower than the one before it, from the speed-history files, and which browser checks a change needs re-run. It runs nothing itself, so it costs no browser time.
- speed-lab 1.1.1 ยท API 1: One-button speed test run on the device: compares your page with parts switched off, keeps the scene in view and uncovered, and says the answer in plain sentences with a copyable table.
- storage-probe 1.1.0 ยท API 1: Page that tells you in plain words whether copies of a page saved in different folders share their saved data, see each other's writes and locks; one button, copyable report.
- test-isolation 1.1.0 ยท API 1: Puts a prefix in front of every localStorage key on a test page, so a speed test or random-play run never touches the real saved game.
- test-runner 1.3.0 ยท API 1: Shared pieces for browser checks and speed tests: warm browsers, a four-browser runner, fair timing, skip-unchanged wasm builds, a wasm-versus-JavaScript twin test, a picture fingerprint gate and an automatic bisect.
- webkit-driver 1.4.1 ยท API 1: Drives WebKitGTK or GNOME Web from Node with no dependencies, using the call names of Playwright and Puppeteer (goto, evaluate, waitForFunction, mouse, keyboard, screenshot, console errors), so a test written for them can also run in WebKit.
App - Efficiency
Keep a one-file app small and light: smaller data in memory, smaller pages on the wire.
- elias-fano 1.4.0 ยท API 1: Keeps sorted whole numbers (ids, positions, links of every item of a map) in a third to a half of the memory of plain arrays and still answers 'value number i' and 'first value at or above x' without unpacking; also keeps many sorted lists in one structure and decodes them all at once. WebAssembly with SIMD, plain JavaScript fallback with the same answers. global
EliasFanoยท 62.3 KB ยท docs - lfc-pack 0.1.9 ยท API 0: Packs newline-delimited JSON (logs, events, API dumps) into LFC-pack (.json.lfc): every field becomes a typed column inside zstd blocks, with a footer of per-block number ranges. Reads back the same rows as JSON.parse (or the exact original bytes), only some keys, or only a time range, with helper workers for big files. WebAssembly is required; a Python reader is included. global
LfcPackยท 697.5 KB ยท docs - memory-compression 2.6.5 ยท API 2: Keeps big data packed in memory and brings it back exactly, in one file with one pack/unpack: bytes and typed arrays (a 120 MB scene shrinks to 52%, 41% in small mode, and restores in about 239 ms in Firefox 158.0, against 312 ms with lz4-wasm and 1.5 s with fflate; lower is better) and big lists of plain JavaScript objects (300,000 link objects shrink to 14% of their JSON text, 35% for msgpackr with records). Picks the right layer by itself; MemoryCompressionJSO stays as an alias. global
MemoryCompressionยท 395.7 KB ยท docs - single-file-tools 1.2.0 ยท API 1: Font subsetting, safe inline-SVG tightening and a Zopfli self-extracting packer for one-file games.
- text-columns 0.1.1 ยท API 0: Reads CSV or TSV text into typed columns: plain decimal columns come out as Float64Array straight from the bytes, the rest as text. The field scan runs in WebAssembly SIMD; plain JavaScript gives the same answers. global
TextColumnsยท 17.4 KB ยท docs
Model simulation
Simulate random walkers over a graph.
- walker-sim 2.4.0 ยท API 2: Simulates random walkers on a network with seeded, repeatable runs, 16 random-number distributions, 95% ranges and the exact odds to check against (1,000,000 walkers in about 52 ms with the WebAssembly loop in Chromium 155 and Firefox 158, lower is better). Big runs use a WebAssembly loop first, JavaScript when it cannot. global
WalkerSimยท 73.4 KB ยท docs
Visualization
Draw maps, flow charts and animated pictures from data.
- gif-writer 1.5.1 ยท API 1: Writes animated GIFs from canvas pictures with one shared palette, storing only the pixels that changed (about 6.8 times smaller than gifenc on a mostly still animation). global
GifWriterยท 44.0 KB ยท docs - clip-writer 1.0.1 ยท API 1: Turns pictures into a short MP4 or WebM video in the browser with the browser's own video encoder and two small file writers, no libraries; the same add/finish shape as gif-writer, and about 8 times smaller than a GIF of the same pictures in Netflow Map. global
ClipWriterยท 11.4 KB ยท docs - netflow-engine 2.2.2 ยท API 2: The engine of Netflow Map as a module you can copy and adapt: nine views of a map and eleven network layouts, no two items on top of each other, WebAssembly twins for Force and Distances, and a use() hand-over for the layers and Sankey add-ons; a 30,000-item network lays out in about 0.8 s in the Netflow Map app (Firefox). global
NetflowEngineยท 205.2 KB ยท docs - netflow-layers 1.5.1 ยท API 1: Lays out a graph in rows (top to bottom or left to right) with story order, tags instead of very long links, a column for the pages every route passes, and tall maps cut into columns. global
NetflowLayersยท 50.9 KB ยท docs - netflow-scene 1.3.1 ยท API 1: Turns a Netflow Map layout into plain drawing lists (dots, links, labels, ribbons, shapes) that Canvas 2D, WebGL2, WebGPU or SVG can draw the same way; big flat maps keep links in typed lists and reuse link looks between pictures. global
NetflowSceneยท 114.7 KB ยท docs - netflow-sankey 2.3.0 ยท API 2: Lays out a flow chart (Sankey) from a plain list of links, with about half the weighted crossings of d3-sankey on the charts measured, backward links drawn instead of crashing, and an SVG drawer. global
NetflowSankeyยท 48.2 KB ยท docs
Size and packaging
Open zip and Excel files safely, and pack a finished page into a smaller file that unpacks itself.
- lzma-decode 1.3.0 ยท API 1: LZMA1 decoder that uses WebAssembly first (about 1.5 to 2.6 times faster to open a page) and falls back to a small readable ES5 JavaScript decoder; tested against Python's lzma. Browsers can only unpack gzip and deflate natively. global
lzmaDecodeยท 22.2 KB ยท docs - lzma-pack 2.0.0 ยท API 2: Packs one HTML file into a smaller self-unpacking file with LZMA and a hash check (Python 3 standard library).
- pcodec-js 1.6.1 ยท API 1: Pcodec for web pages: unpacks (and optionally packs) big lists of numbers in a browser, one file, same bytes as any other Pcodec. The unpack-only file is 61 KB gzipped (the other JavaScript build of Pcodec is 324 KB), streams a 4,000,000-number file in 6.3 MB of memory, and WebAssembly is required (no plain-JavaScript backup). global
PcodecJSยท 104.0 KB ยท docs - ppmd-decode 1.3.0 ยท API 1: A PPMd (7-Zip PPMd7) decoder that uses WebAssembly first (about 1.4 to 1.8 times faster to open a page) and falls back to one ES5 JavaScript function, about 6.6 KB packed. It unpacks web-page data about 10% smaller than LZMA, but slower. PPMd is by Dmitry Shkarin; the public-domain code it follows is Igor Pavlov's, from 7-Zip. global
ppmd7Decodeยท 45.3 KB ยท docs - ppmd-pack 2.0.0 ยท API 2: Packs one HTML file into a self-unpacking file with PPMd, the 7-Zip text compressor (PPMd by Dmitry Shkarin; public-domain code by Igor Pavlov, 7-Zip). Pure Python; pays off above about 60 KB of compressed data.
- zip-open 1.3.1 ยท API 1: Opens .zip and Excel .xlsx files safely: limits counted on what really unpacks, so a zip bomb stops at the limit with a plain-words note. global
ZipOpenยท 32.5 KB ยท docs
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-diff: Says in plain words what one edit did to a story, such as "Add page โThe Cellarโ".
- story-format: Create, clean, search, import and export interactive stories as JSON, with a JSON Schema. Twine import lives in twine-import.
- story-outline: Turns an indented outline into pages and choices, or into a whole branching story.
- twine-import: Reads Twine stories (Twine 2 HTML, Twee 3, Twine 1) and turns SugarCube and Harlowe code into rules, with a plain-words report.
Story validation
Find dead ends and endings nobody can reach before a reader does.
- story-check: Exact checker for branching stories with items, numbers and dice: dead ends and endings no player can reach.
Story flow
See a story's shape: maps of its pages and simulated readers.
- story-map: Layered, arc and matrix drawings of a story graph (SVG) and seeded simulated players.
Story build and distribute
Turn a story into a game, or play it from code or a terminal.
- story-player: Build one offline HTML game from a story, or play a story from code or a terminal.
Story packaging
Pack a finished story page into a smaller page.
- zip-page: Wrap a finished HTML page into a smaller page that unzips itself, with a pure-JS inflater fallback.
Story testing
Run tests on stock Firefox, generate random stories and keep two implementations in step.
- contract-kit: A guide and a helper (about 7.2 KB minified) for keeping two implementations of one rule set from drifting apart: seeded random inputs, a side-by-side comparison (also for async functions), shrinking a failing input to a small one, a field table and a time limit; runs in browsers too.
- qa-kit: Tiered test runner and a Playwright-style API over WebDriver BiDi for stock Firefox; seeded random-story generator.
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.
- ai-collab-kit: A written process and templates for a person and an AI assistant building software together.