Case Study

Exploration: Turning a Twine story into a playable Unreal level with AI

November 2026

The brief

Choose your own adventure was my first introduction to interactive fiction, and I wanted to see how it could work in a game environment. With the support of AI (Claude), I built a pipeline that turns a Twine story into a playable blockout in Unreal Engine. Twine is one of the top tools for writing branching, interactive fiction.


The problem

There are a lot of well-developed tools for authoring interactive fiction, like Twine and ink. Level layouts, even blockouts, lag behind text because building a space takes longer than writing a passage. If AI can generate blockouts that show a story in progress, designers can iterate quickly and spend more time on the player experience.


This was also an exercise to see what AI is good at and how it could make prototyping faster. I wanted to finish in about a day, so letting AI do most of the heavy lifting made sense.

The approach

I started by asking Claude for a list of things it could build quickly. I decided to combine its ability to generate level layouts with a simple choose your own adventure. Claude proposed building it as a pipeline: a Twine story goes in, and an Unreal level comes out, with passages as rooms and choices as doorways.


Claude generated a short story in Twine that can be clicked through, then wrote the Python scripts that turn it into a blockout. The gameplay itself (rising water, doors, the pickup, subtitles, endings) I built in Blueprints from Claude's written instructions. Then I playtested and iterated on the experience with Claude.

Area
What I did
What AI did

Concept

Decided to combine choose your own adventure with AI level layout generation

Pitched prototype ideas; proposed the pipeline

Story

Set the story rules

Generated the Twine story

Tools

Tested the pipeline in engine and identified problems

Wrote the parser, layout planner and Unreal import script in Python

Systems

Built every Blueprint in engine

Wrote step-by-step Blueprint instructions

Feel

Raised every problem from playtesting and chose the fix

Proposed options when I raised a problem

Table shows the division of labor for the various tasks.
Twine story map showing seven passages and the choices between them.
The Twine story that Claude generated.

The results

Playthrough: one route through the level

Most of the build went smoothly. The largest time sink was the Blueprint scripting. Because I worked in a chat session, not an integrated coding session, I had to turn Claude's written instructions into graphs by hand. Setting that up properly is what I'd do next.


Major changes from playtesting:

  • Raising the water when the player leaves a room, not when they enter it

  • Making each room look different enough to match the story

  • Making the final room feel like an escape, so the ending reads clearly

  • Trimming dialogue so stale lines don't play when the player moves quickly

  • Adding feedback when the player picks up the notebook

  • Adding a fail state when the water rises over the player's head, so the water has real stakes


AI assistance has come a long way. I was able to build a working Twine-to-Unreal pipeline in about a day, and there are clear ways to do it more efficiently, like running Claude directly in the project so I only touch the scripting when I want to. Now that there's something to play, I want to spend more time on the game systems and how the player interacts with the world.