In short
To write interactive fiction, start from a one-sentence premise and the endings you want, pick a branching structure that keeps the story manageable (branch-and-bottleneck is the safest for a first project), make every choice carry context and consequence, then draft in a tool that matches your form: Twine or ink for choice-based stories, Inform 7 for parser games. Test with real players before you publish.
- Plan structure before prose: unchecked branching doubles your workload with every choice
- A good choice has a clear option, an understandable stake and a visible result
- Track state (variables) instead of writing a new branch for every difference
- Publish free first (itch.io, IFDB, competitions), then consider apps or paid platforms
Interactive fiction is a story the reader steers. Sometimes that means picking from a short list of options, as in the Choose Your Own Adventure books that Bantam began publishing in 1979; sometimes it means typing commands such as open the airlock into a parser that understands them. Either way, the writer is no longer building one path through a story but a space of possible paths, and that changes almost every craft decision a novelist is used to making.
The good news for prose writers is that the core skills transfer: character, voice, pacing and tension still decide whether anyone keeps reading. What is new is architecture. This guide covers both, from premise to publishing, and it is written for novelists and short-story writers trying the form for the first time. Most first projects are free browser games, but if a story grows into something larger, many authors eventually bring in a mobile development team that can package the story as a native app for iPhone and Android readers.
If you are deciding whether your existing novel should become an app at all, start with our guide on how to turn your book into an app. This article is about writing a new branching work from scratch.
What is interactive fiction?
Interactive fiction (often shortened to IF) is narrative in which the reader's input changes what happens next. The term covers two broad families that feel very different to write.
- Choice-based IF. The reader selects from options presented on screen. Gamebooks, Twine stories, ChoiceScript novels and most mobile story apps sit here. The writer controls exactly which actions are possible.
- Parser-based IF. The reader types free-text commands and the game interprets them. This is the tradition of Zork and the classic text adventures. The writer has to anticipate what players might try, which makes it closer to programming a small world than writing a branching plot.
Visual novels, narrative games and story-driven chat apps borrow from both. For a writer coming from novels, choice-based IF is the usual entry point because it keeps the focus on prose and decisions rather than on world simulation.
How should you plan an interactive story before writing?
Planning matters more in IF than in linear fiction, because a weak structural decision multiplies across every branch. Three things should exist before you write a single passage.
A one-sentence premise
Write who the protagonist is, what they want and what happens if they fail: A stranded engineer must restart a dying colony ship's reactor before the crew wakes from cryosleep into darkness. That sentence tells you what kinds of choices belong in the story. Choices that do not touch the want or the stakes are decoration.
The endings
Decide your endings early, at least roughly. IF stories usually have several outcomes, and knowing them lets you plant setup for each one in the shared early sections. A common mix is one or two good endings, one or two bittersweet ones and a small number of failures that feel earned rather than random.
A map
Sketch the structure on paper, in a mind-mapping tool or directly in Twine's visual editor. Boxes are scenes, arrows are choices. The map is where you catch problems that would take weeks to find in prose: dead branches, endings nobody can reach, and a middle section where every route looks the same.
Which branching structure should you choose?
The biggest trap in interactive fiction is combinatorial explosion. If every passage offers two choices that lead to wholly separate content, ten choices deep you need 1,024 endings. Nobody writes that, so experienced IF authors use recurring structural patterns that give readers real agency without infinite work. Designer Sam Kabo Ashwell catalogued the most common ones; the table below summarises the patterns most useful for a first project.
| Pattern | How it works | Best for | Main risk |
|---|---|---|---|
| Time cave | Every choice splits into separate content; branches never rejoin | Very short pieces, gamebook-style experiments | Explodes in size; each path is short |
| Gauntlet | One main line; wrong choices end the story or loop back | Survival, horror, puzzle stories | Feels linear; failures can seem arbitrary |
| Branch and bottleneck | Paths split, then rejoin at key events; earlier choices are remembered through state | Most narrative IF, novel-length choice games | Readers may notice the funnel if consequences stay invisible |
| Open map | Reader moves freely between locations in any order | Exploration, mysteries, parser games | Pacing is hard to control |
| Sorting hat | Early choices place the reader on one of several fairly linear routes | Faction or character-route stories | Each route must stand alone as a complete story |
| Loop and grow | The story repeats a cycle; each pass unlocks new options | Time loops, day-by-day survival stories | Repetition fatigue if each loop adds too little |
For a first project, branch and bottleneck is the safest choice. It keeps the word count manageable, lets you write strong set pieces that every reader sees, and still lets choices matter, because the bottleneck scenes can change depending on what the reader did earlier. That last part depends on state, covered below.
How do you write choices that matter?
A choice is the basic unit of IF craft, the way a scene is the unit of a novel. Weak choices are the most common reason readers quit. A strong choice has three properties.
- Context. The reader understands the situation well enough to have an opinion. A choice between two unlabelled corridors is a coin toss, not a decision.
- Stakes. Each option costs or risks something the reader cares about: time, trust, safety, a relationship, information.
- Consequence. The result is visible, either immediately or later in a way the reader can trace back. Consequences that never surface teach readers that choices are fake.
A few further rules help in practice:
- Get to the first choice quickly. Many IF readers expect a decision within the first screen or two, roughly a few hundred words. Long openings work better in novels than in branching stories.
- Avoid false choices. Three options that lead to the same text are fine occasionally for expressing character, but readers notice patterns. Acknowledge the choice in the next passage even if the plot converges.
- Let choices express character, not just plot. Asking how the protagonist responds (with humour, anger or silence) creates attachment even when the plot path is shared.
- Keep option text short and distinct. Two options that sound alike force readers to guess what the writer meant.
A reader forgives a story that funnels them, as long as it remembers what they did on the way.
What is state, and why does it save so much writing?
State is the story's memory: variables that record what the reader has done. Did they lie to the captain? How much oxygen is left? Is the engineer's sister still on speaking terms? Instead of writing a whole new branch for each difference, you write one passage with small conditional variations.
For example, the bottleneck scene where the crew wakes up can be the same scene for everyone, with a different opening line depending on whether the reader saved the medical bay, and an extra exchange if the captain caught them lying. That is a few sentences of extra writing instead of three parallel chapters. Every IF tool supports variables; Twine, ink and ChoiceScript all let you test them with simple if-statements, no programming background required.
Common state to track:
- Relationship scores with key characters
- Resources (supplies, money, time remaining)
- Flags for major decisions (yes/no facts about the story so far)
- Personality traits the reader has expressed, used to colour the prose
Character work still matters here. A relationship variable is only meaningful if the character behind it is vivid; see our notes on creating characters with wants, needs and contradictions.
Which point of view works best in interactive fiction?
Second person (you step into the airlock) is the IF default, and for good reason: it puts the reader in the protagonist's position and makes choices feel personal. It is not mandatory. First person works well when the protagonist has a strong, defined personality the reader is steering rather than inhabiting, and third person suits stories where the reader directs several characters. Our guide to choosing a point of view covers the trade-offs in linear fiction; in IF, the key question is how much of the protagonist's identity the reader is allowed to decide.
Whatever you choose, keep the tense and person consistent across every branch. Writing passages out of order makes slips easy, so search for stray pronouns during revision.
Which tool should you use to write interactive fiction?
The tool shapes the form of the story, so choose it based on what you want to write, not on what is most popular. All of the following are free to start with.
| Tool | Type | Learning curve | Output | Good fit |
|---|---|---|---|---|
| Twine | Choice-based, visual story map | Low | Single HTML file playable in any browser | First projects, short to medium stories, writers who think visually |
| ink (with the Inky editor) | Choice-based scripting language by inkle | Low to medium | Web export; integrates with the Unity game engine | Dense branching prose, projects that may become games or apps |
| ChoiceScript | Choice-based, stat-driven | Low to medium | Web; publishable through Choice of Games and Hosted Games | Long, novel-length choice games with many variables |
| Inform 7 | Parser-based, English-like syntax | Medium to high | Story files playable in interpreters and browsers | Text adventures, puzzle-driven world simulation |
| Ren'Py | Visual novel engine (Python-based scripting) | Medium | Desktop, web and mobile builds | Stories with art, character sprites and music |
Twine is the usual starting point. It is open source, runs in a browser or as a desktop app, and shows your story as a map of connected passages, which makes structural problems visible at a glance. The official site at twinery.org has the download and reference documentation. If you outgrow it, ink is a natural next step: it reads almost like prose with markup, and it was built for commercial narrative games.
How to write your first interactive story in 8 steps
- Write the premise sentence and list three to five endings.
- Choose a structure from the table above. For a first piece, branch and bottleneck with two or three bottleneck scenes.
- Map the structure on one page: bottleneck scenes as large boxes, branches as smaller ones.
- Decide your state: the handful of variables that will carry consequences between bottlenecks.
- Draft the trunk first. Write the bottleneck scenes every reader will see, so the spine of the story is solid.
- Draft branches one route at a time, rather than jumping around the map. It keeps voice and continuity consistent.
- Play every path yourself and fix dead ends, broken links and variables that never get checked.
- Test with three to five readers who have not seen the map. Watch where they hesitate, which options nobody picks and where they stop reading.
Expect revision to take longer than in linear fiction. Changing one early scene can ripple through every branch that depends on it, so revise structure before polishing prose, the same principle behind finishing a full first draft before going back to the beginning.
Where can you publish interactive fiction?
IF has a smaller but very engaged audience, and most of it gathers in a few places.
- itch.io. The default home for independent IF and narrative games. Upload a Twine HTML file, set a price or make it free, and use tags so readers can find it.
- IFDB. The Interactive Fiction Database lists works, reviews and ratings. Adding your story there makes it discoverable to long-time players.
- Competitions. The annual Interactive Fiction Competition (IFComp), running since 1995, and smaller events such as Spring Thing give new authors reviews and an audience in a single season. Check each event's rules first, since many require that entries are unpublished.
- Choice of Games and Hosted Games. Publishers of ChoiceScript stories, which they distribute on the web and in app stores with a revenue share.
- Your own site. A Twine story is one HTML file, so you can host it on your author website alongside your books.
- App stores. A standalone app gives you a store listing, offline play, notifications and in-app purchases, but it is a software project with its own costs and review rules.
If you already publish serial fiction, the same audience habits apply: regular releases build readers faster than one big launch. Our guide on how to publish serialized fiction covers schedules and platforms that also suit episodic IF.
Common mistakes to avoid
- Starting with prose instead of structure. Branches written without a map tend to sprawl or dead-end.
- Too many choices too early. Ten options in the opening passage overwhelm readers before they care about the story.
- Invisible consequences. If nothing ever references a decision, readers stop trusting the choices.
- Random deaths. Failure endings should follow from information the reader had, not from a hidden coin flip.
- Untested variables. A relationship score that is set but never checked is wasted work and a missed payoff.
- Scope creep. Finish a small piece first. A complete 15,000-word story teaches more than an abandoned 100,000-word plan.
Questions
Do I need to know how to code to write interactive fiction?
No. Twine works with links and a visual map, and simple variables in Twine, ink or ChoiceScript use short if-statements that most writers learn in an afternoon. Parser-based tools such as Inform 7 demand more logic, but even there the syntax reads like English.
How long should an interactive fiction story be?
Many successful first pieces are 10,000 to 40,000 words in total, with a single playthrough taking 15 to 60 minutes. Commercial choice-based novels can exceed 300,000 words, but that is a multi-year project, not a starting point.
What is the difference between interactive fiction and a visual novel?
Interactive fiction is primarily text, where the prose carries the experience. Visual novels pair text with character art, backgrounds and music, and their choices often focus on relationships and routes. Both use branching narrative, and tools such as Ren'Py sit between them.
Can you make money from interactive fiction?
Yes, though usually modestly at first. Authors sell stories on itch.io, publish through Choice of Games or Hosted Games for a revenue share, use Patreon for episodic releases, or turn a successful story into a paid app. Free releases and competitions are the usual way to build an audience first.
Which is better for beginners, Twine or ink?
Twine is easier to start because the visual map shows structure directly. Ink suits writers who prefer working in a text file and plan to integrate their story into a game engine or app later. Many authors prototype in Twine and move to ink for larger projects.



