InfiniteScribe - AI Game Master in a Phone App
Taking a bit of a break from the software development team management posts for a second (they were very cathardic!), part of the reason I’ve been silent on the blog as of late was because I was spending all my time on my generative AI magnum opus - a little mobile app I’ve called InfiniteScribe. I’d like to put together a series of posts describing exactly what I’ve managed to achieve with the game so far in two months, and where I’d like to take it!
This certainly isn’t the first time I’ve talked about using generative AI in a game master context, but most of my example projects to date have been some form of console application, focusing more on the interaction rather than the interface. InfiniteScribe is my first attempt at making a phone and user-friendly UI for my gen AI ambitions, and (despite the fact that it’s mostly developer art and looks terrible) I feel like it’s come together pretty well!
I’ve developed the game using the .NET MAUI Blazor framework, which allows you to make a phone-native application using Blazor, in a similar vein to other frameworks like PhoneGap or Ionic. My primary motivation for using MAUI was mostly familiarity with .Net and Blazor, allowing me to focus on the functionality instead of having to learn a new UI framework.
I’m also using Google’s Gemini Flash and Gemma language model APIs, which is a first for me. I decided to go with Gemma because (at the time) it was one of the highest scoring LLMs on the EQ-Bench creative writing leaderboard - it’s since been overtaken by o3, 4o, and various other models. Luckily I’ve written the code in such a way that swapping out LLM implementations is fairly trivial, so I have a task on my board to give those newer models a try soon.
General Premise

The core game loop of Infinite Scribe is modeled after a choose your own adventure game, where at each decision point the user is given several options to choose from in order to progress the story. I've stayed true to this approach from "game inception" all the way through the core scene-by-scene gameplay loop. I've also modeled the game after the old 90's style text-based adventure games, which is reinforced by the 8-bit aesthetic I've given the UI as well as the generated images created by language models.
As users select options, the story progresses based on both their choices as well as a calculated odds of success, which is then "rolled" against, determining if their action was successful or not. This is similar to pretty much every tabletop RPG, where in Infinite Scribe a language model is taking the role of the game master, determining how the story progresses within the player's choices.
Game Creation
Outside of all the usual “create account / login” stuff, InfiniteScribe manages two main game state: the game creation (which only happens once, at the start of a new game), and the scene progression (which happens perpetually, hence the “infinite” part of the name).
Using the conversation UI techniques we’ve discussed before, I have a model loop walk the user through crafting their game experience. We ask about the genre, tone, premise, and starting location of their new game, much like the previous examples. One cool twist I added was the generation of a background image that evolves as users make their choices.



I’ve found this really reinforces the feeling of the user “crafting the world”, and also it looks really cool :)
Character Creation
Character creation was a new apsect I added to the flow, but it follows a similar approach to the game creation. Using a conversation loop I ask the user to pick a name, occupation, motivation, trouble, and a few positive and negative traits for their character. I also add the user they’ve picked to the generated background image, although there’s still a few tweaks I’d like to make there to improve the quality of the characters.
All of this is persisted for later use; the character occupation, skills, issues and detriments are rolled into each odds calculation as I’ll demonstrate later.
Game Flow
Once the game and character has been set up, the user will enter a perpetual story loop (or “infinite” if you will 😉) where they’re presented with options, the option they select is evaluated, and the story continues. The only perceived break in this is when the user enters a new “scene”, which is caused by their character leaving to a new area in the story or passing out due to physical stress.
Scenes actually serve a specific purpose in the game’s design, both in the process of odds calculation to give an ebb and flow to the narrative, but also mechanically, allowing us to “take a break”, summarize what’s happened so far, and start a new conversation context with the language models under the hood.
With this approach, the user can spend an infinite amount of time in their crafted world as their selected character, making choices that shape the setting. I’ll dive more into the particulars of how this is achieved in a future post.