About the project
Each run starts with dice rolled in code — genre, motif, hidden truth, twist, ending tone — and an AI author then writes that "script contract" into a three-chapter book. The engine owns every number, and a procedural "old manuscript" author keeps it fully playable offline, no API key required.
A run of Endless Script is a book. Draw lots from a fortune tube, a star chart or a page of text, choose one of three proposals the author pitches, and place your bet. After the cold open come three chapters of investigation, conversation, puzzles and encounters — and defeat doesn't end the run; it branches the story and raises the price.
Between chapters you rest, grow and trade. The ending quotes your key choices back to you before a closing "your story" page. Finished books go on a shelf; export a script code to replay one, or carry a legacy into the next book as a rumor.
The author is switchable in settings — the offline procedural author, Claude through a server-side proxy (the API key never leaves the server), bring-your-own-key, or a free mock author that deliberately injects common mistakes so you can watch the pipeline repair itself.
Endless Script
Highlights
- 01
The dice live in code
The fate layer deals the story's skeleton; the AI only adds the flesh. Generated text can only reference IDs from the asset pool and the engine computes every number, so the model can't cheat.
- 02
A six-stage writing pipeline
Proposal → story bible → beat sheet → scenes → validation → polish. Model tiers split by stage, structured output with three fallback levels, prompt caching on a stable prefix and a per-run token budget.
- 03
Nothing ever breaks the run
Any failed step is repaired locally or patched by the procedural author, so the script package is always complete and playable. Later chapters are written in the background while you play the first.
- 04
Validators on guard
Reference integrity, reachability simulation, puzzle fairness, a suspense ledger, budget and tone checks — a broken script never reaches the player.
- 05
Measured, not guessed
200 books generated offline — 100% pass validation, 600 bot playthroughs all reach an ending with zero soft-locks, and chapters average about 22.8 minutes.
- 06
Procedural art and sound
Woodcut-style SVG portraits and rooms, a score synthesized live with WebAudio, and a canvas cold open where a cloud of words surges and reassembles into the book's epigraph.
Endless Script