Branching stories fail in ways that are hard to see. A choice leads to a section that assumes a character is still alive. A death has no warning. A route quietly becomes unreachable after an edit three acts earlier. Human editors catch some of this. Nobody catches all of it across 269 sections.
Heartwood is interesting not only because it is a good sci-fi horror gamebook, but because it treats that problem as an engineering problem. Its developer built a checker that plays 5,000 random games after every story change, then added AI playtesters to catch what random play cannot. The result is a branching narrative that holds together at a scale one person could not manually verify.
What Heartwood is
Hollow Reach has been silent for nineteen days. Two hundred and twelve colonists are down there under a terraforming colony on a tidally locked moon, and your private military squad has been sent to bring them home. The colony is not dead. Something down there is perfectly healthy, and it is growing out of the people you came to rescue.
The structure follows the Fighting Fantasy tradition: numbered sections, dice, and choices that come back to haunt you three acts later. It adds what paper cannot do:
- Four acts — Descent, The Reef, Holdout and The Heartwood — and 269 numbered sections. A run takes about half an hour and shows roughly a third of each act.
- Six squadmates, each with a skill. Any of them can die, and who is still alive changes what text you see and which choices can succeed.
- Four stats — STAMINA, NERVE, AMMO and NOISE. Every shot is heard. In the reef, SPORE climbs, and at 10 you are Rooted.
- A siege on a real clock in the Holdout act: three waves, doors to barricade, squadmates to post.
- Seven endings, including Rooted, plus dozens of ways to die, each written out in full.
- Backgrounds and difficulty. Combat medic, ex-miner or sniper; Recruit lets you rewind one death, Ironman deletes the save.
That is a lot of state for a browser gamebook, and it is exactly why the testing layer matters.
The QA loop is the real innovation
The development log describes two layers of automated testing. The first is a checker that plays 5,000 random games after every story change. It looks for dead ends, unfair deaths, and lines spoken by squadmates who are already dead. That is a graph problem disguised as a writing problem, and it is the kind of thing a random-play bot is genuinely good at: it explores paths no author would think to test.
The second layer is AI playtesters playing full games in different styles. Random play cannot notice that a section forgets what you did two acts ago, because it has no memory of intent. A playtester with a consistent approach can. The combination — exhaustive random coverage plus a few coherent long runs — is a sensible division of labour between a machine and a reader.
For anyone building a branching game, this is the most transferable idea in Heartwood. It is also the focus of the new numbered-section horror gamebook prompt, which asks for the story as data and a 5,000-run test harness as part of the deliverable.
A constraint that improves the look
The presentation is unusually coherent for a solo browser project. All art is pixel art limited to the Mega Drive’s 16-colour palette, generated with Codex’s image tool and then reduced by a script so the constraint is real rather than approximate. Every sound is synthesised in the browser: the colony’s machinery, the wind, a tracker that pings faster as something closes in, and breathing inside the walls.
That restraint does more than look good. It keeps the file self-contained, makes the art consistent across 269 sections, and gives the game a single visual identity that a pile of individually generated images would not. The game is designed to be played on a phone, in portrait, with headphones and the lights off — a much better fit for a horror gamebook than a desktop layout.
Progress saves in the browser after every section, the game installs as a PWA, and it is available in English and Brazilian Portuguese, with Brazilian names for the places and the colony’s AI.
Where it is rough
This is a first public release, and the developer says so. The itch.io page invites players to report where it drags, where a death felt cheap, and which ending they got, including the section number. A game with seven endings and dozens of deaths will have balance problems that only real players find.
Browser saves are also fragile. Heartwood saves locally, which is the right choice for a free game with no accounts, but it means clearing site data or switching browsers loses the run. The offline build is published separately, which helps, but it is still not a cloud save.
What builders should steal
- Write the story as data, not prose in code. Sections with ids, choices, requirements and effects can be tested; paragraphs inside a switch statement cannot.
- Test after every edit. Not at the end. Contradictions accumulate with each rewrite.
- Constrain the art on purpose. A 16-colour palette and synthesised audio make a solo project look intentional.
- Design for the device people will actually use. Portrait phone first, headphones recommended.
Verdict
Heartwood is a strong horror gamebook and a stronger case study. The writing is atmospheric, the squad system gives choices weight, and the siege act gives the middle of the game a clock. But the part worth copying is the boring part: a robot that plays 5,000 games so a human can trust a story with 269 doors.
If you are building any kind of branching game, play it once for the story and then read the devlog for the process.