Write a branching text adventure and publish it as a web game
A text adventure is a map of scenes joined by choices, plus a memory of what the player has done. Anticode can turn your outline into a playable web game with an inventory, flags that change later scenes and progress saved on the reader's device, then publish it on an anticode.dev address or your own domain.
Branching without the explosion
If every scene offers two choices and every choice leads somewhere new, ten scenes deep you're writing over a thousand passages. Experienced interactive fiction writers avoid that with a few well-known shapes:
- Branch and bottleneck
- Paths split, then rejoin at key scenes everyone reaches. What differs is how they got there and what they carry.
- Hub and spokes
- A central place (a ship, a town square) with excursions that can be done in any order; the ending opens when enough are complete.
- Parallel tracks
- Two or three distinct routes chosen early, each with its own short branching.
- Gauntlet
- Mostly linear, with side choices that kill or reward but don't change the main path. Good for short horror or comedy.
Pick one shape before you write. It decides how many scenes you need and keeps the story finishable.
State: what the game remembers
The difference between a choose-your-own-adventure and a game is memory. A scene that reads differently because you kept the lantern, lied to the innkeeper or visited the cellar first feels authored. Three kinds of state cover most stories:
- Inventory: items picked up and used, shown in a panel. Keep it short; a pocket of six things is more interesting than a warehouse.
- Flags: yes/no facts ("met the ferryman", "door unlocked") that unlock or change choices.
- Counters: trust, health, time left. Show them only if the player should manage them; hide them if they should feel consequences without seeing the maths.
Choices that depend on state can be hidden, or shown and greyed out with the reason ("You'd need a light"). Showing them tells the player the world has rules, which encourages a second play-through.
Endings and replay
Three to six endings is a common range for a short piece. Name them, and show which ones a reader has found on a final screen, so finishing once invites another go. A "rewind to last choice" button respects the reader's time far more than sending them to the start after a bad decision.
Turning your outline into a game
When you use Anticode as a text adventure game maker, the more of the story you give, the more of it is yours. You can paste a full script with scene names and choices, or a synopsis and ask the model to draft scenes for you to edit. A request might read: "A ghost story in a closed seaside hotel, about 30 scenes in a branch-and-bottleneck shape, with an inventory of up to five items, a 'nerve' counter that drops in dark rooms, four endings, and a list of endings found. Typewriter text that can be skipped. Muted green and grey look."
Anticode's model writes the whole thing as one HTML document: scenes as data, a small engine that reads them, and the interface around it. It works at phone width and with a keyboard, with choices as real buttons a screen reader can announce. If the text is long, ask for a comfortable reading measure and a font size control. Afterwards, ask for changes in words, such as "in the cellar scene, add a choice to hide if the player has the blanket".
Saving and publishing
Progress, inventory and endings found save in the reader's browser, so they can close the tab and carry on later on the same device. Ask for two or three save slots if your story is long. Publish to an anticode.dev address, or on a paid plan connect your own domain so the game lives at your name; free sites show a small "Made with Anticode" badge. You can also export it as one self-contained HTML file and host it anywhere that accepts a web page.
Limits
- No typed-command parser by default. Classic "go north, take lamp" parsers are possible to ask for, but choice-based play is far easier to make good.
- No AI storyteller inside the game. The sandbox can't call a model, so scenes are written in advance.
- No cloud saves or shared achievements. Saves are per device and browser.
- No reader comments or ratings. Link to wherever your readers already talk.
If your story is more picture book than game, see interactive stories. For puzzles-first play, the online escape room suits better, and an author website can sit alongside the game.
Questions people ask
Can I add illustrations?
Yes. Add your own images to the build and say which scene each belongs to, or ask for illustrations drawn in code, such as SVG silhouettes or patterns.
Can readers play on a Kindle or e-reader?
It's a web page, so any device with a modern browser can play it. Basic e-reader browsers often handle JavaScript poorly, so test yours.
How long can the story be?
Each app is one document of limited size, so a short story of up to a few tens of thousands of words fits. A novel-length work is better split into chapters as separate builds.