Interactive Storytelling with AI
Since I was a kid, I used to play text based adventure games. These are some of the earliest interactive experiences I had with computers, and they sparked my imagination in a way that few other games have. When ChatGPT came out, one of my first experiments was to simulate a text adventure game. I wanted to see what happens when there is no predefined command set, no rigid branching paths—just you, the game, and infinite possibilities. Of course, ChatGPT soon lost context and started hallucinating, I could not go back to locations I had visited, the world suddenly changed and NPCs couldn't keep track of a conversation.
I wanted to try building something more robust, a framework that could handle the complexity of a living world while still giving players the freedom to explore and interact naturally. What if the state of the world was explicit and structured, while the narrative and interpretation were handled by AI agents?
Unbound is my playground for exploring this idea. It started as a game but quickly became a framework for building AI agents for interactive storytelling. The goal is to find new ways to balance structure and freedom, consistency and creativity. Additionally, it allows exploring new ways of interactive storytelling that are made possible by the use of AI and go beyond the traditional text adventure format.
What It Feels Like to Play
Commands aren't limited to a predefined set. You can roleplay, explore, question assumptions. The game meets you where you are. Every playthrough generates its own infinite world. Locations, items, and encounters are created as you explore. No two games are the same. NPCs remember you. They have personalities, motivations, and quirks. Relationships evolve based on what you do and say. There's no predetermined ending. Story arcs grow organically from your interactions. The game is as much about what you create as what you discover.
How It Works Under the Hood
The user interface is just the text channel you use to send commands and receive responses. It is made to be minimalistic, generic and similar to an app for reading books.
Behind the UI there is a server that forwards the commands to the approriate game type. The server handles session management, throttling, routing, etc.
Each game type has a different schema for keeping track of the world state. Game types use various agents to generate the story setting and locations, handle interactions with the environments, impersonate characters and update the story arc. Some agents are reused across different game types and some are specific to a game type.
The Game Types
So far I've implemented four different game types, each with its own mechanics and feel. They share the same underlying architecture but differ in how they structure the world and interactions:
80s Text Adventure
A classic maze/exploration style. The map is generated algorithmically, not through AI, but locations and characters are generated by AI. Navigate connected locations with directional commands (north, east, south, west). State models rooms and exits; agents handle movement, visibility, and evocative room descriptions.
Text Adventure with Natural Transitions
Similar to the text adventure, but you move in a more natural way between locations. Instead of using the four directions, you can type 'enter shop', 'continue walking down the road' or 'take the train to Ethelburg'.
Movie Style
Dialogue-focused gameplay. Plays like a sequence of scenes where you roleplay conversations and influence relationships. State centers on characters, goals, and active scenes. Game keeps manages story arc and generates the next scene based on progression.
Book Style
A co-writing exercise where the player and computer take turns writing a story in first person. More narrative oriented and targeting book lovers. The game maintains a structured state with characters, settings, and plot points to ensure consistency. State is still structured but has an evolutionary schema.
Try it Out and Give Me Feedback
I've put the game on a server for people to try it out and give me feedback. I'm using the free tier of Gemini, so I'm limiting the number of concurrent users and messages per minute. It can also happen that I run out of credits. In this case, please try again the next day, when Gemini resets the free quota.