Interactive fiction / gamebook
Numbered-Section Horror Gamebook With Automated Playtesting
The Prompt
You are building a sci-fi horror gamebook in the tradition of Fighting Fantasy, as ONE self-contained HTML file (inline CSS/JS, no libraries, no external assets). Content structure: - Four acts and at least 200 numbered sections. Store them as data, not prose in code: each section has an id, act, text, choices, requirements (items, codewords, squad alive) and effects (stat changes, flags, deaths, ending id). - Six squadmates with one skill each. Any of them can die; who is alive must change what text is available and what choices succeed. - Four stats: STAMINA, NERVE, AMMO and NOISE. Every shot raises NOISE. A separate SPORE meter climbs in the reef act; at 10 the player is Rooted — a valid ending, not a bug. - Dice checks written as "roll 2d6 + stat >= target", with success and failure sections defined for every check. - Seven endings, including the Rooted ending, plus a siege sequence where the player barricades doors and posts squadmates during three timed waves. - Codewords carry choices forward across acts; no choice should ever lead to a section that contradicts an earlier death. Presentation: - 16-colour pixel-art look, all art drawn in inline SVG or CSS — no image files. Keep the palette to exactly 16 colours. - Synthesize every sound with the Web Audio API: machinery, wind, a tracker ping that speeds up as danger closes, breathing in the walls. No audio files. - Mobile-first portrait layout, large tap targets, save progress to localStorage after every section, plus an endings gallery showing the routes not taken. - Let the player pick a background (medic, ex-miner, sniper) and a difficulty: Recruit allows rewinding one death, Ironman deletes the save. Testing requirement (do this after the game): - Build a headless simulation that plays 5,000 random runs and reports: unreachable sections, dead ends with no valid choice, deaths with no warning, sections spoken by squadmates who are already dead, and endings that can never be reached. - Then list every issue found and fix them in the file before you finish. After the code, print the section graph summary (acts, sections per act, endings) and the test report.
What This Prompt Produces
Asking for the story as data plus a random-play checker is what makes a branching game shippable — it catches contradictions a human editor would miss across 269 sections. Heartwood on this site was built exactly this way, with 5,000 automated runs after every story change.
Modification Tips
- Write the four acts and the seven endings first; let the model fill sections inside that skeleton.
- Never accept a check without both a success and a failure section defined.
- Run the checker after every story edit, not just at the end — contradictions creep in with each rewrite.
- Keep the palette and sound rules absolute; "roughly 16 colours" will drift to 30.
The Game This Prompt Produced
Want to try it? Open Claude, paste the prompt, and you'll have a playable game in minutes. When you're happy with the result, submit it to Daily AI Games.