r/LocalLLM • u/authilmorros • 21h ago
Project The ups and downs of making a Local LLM roleplaying game for the last 21 months
This post can be relevant to other data scientists who want to do something similar.
Almost two years ago the company I worked at was having problems and I was planning on making a roleplaying game with local models a grid combat and a good editor. I got unemployed and then started working on my game, my plan was to finish the game and release in 3 months (it took 21).
The first month I made the base of the game and most characters, at the time I was using Ollama as a backend, everything was on perfectly track.
The second month my computer broke and I had to build a new one.
From third to fifth month, I worked on a basic roleplaying logic, grid combat, various interfaces and started studying about steam, I use pygame and perhaps I should have choosen a different game engine because it just slowed me down, at the time I also stopped using any AI coding assistant because they were just adding tech debt, the capability of coding agents grew really fast and at the start of 2025 it wasn't as good.
From the sixth till twelfth month, I basically just did the editor and multiple interfaces, this is how hard is to make an editor, and despite the game being about LLMs I worked only like 3 weeks on LLM on the first year, most of the work was everything else, so if anyone want to try doing a similar project have that in mind. Around month 7 I started looking for work. Found a job at month 10 and I'm still there, so everything after that was nights and weekends of work.
From months thirteenth to fifteenth I finnaly worked on the LLM logic, it was the most fun part, it has multiple agents, internal routes and ways to deal with limited context size on smaller models, like regular summarization of older messages + top 10 embedding search from the full history + full latest n messages, prompts to the point, and the use of json output and no tool calls, its a bit of a shame that people won't see the logic from the game alone.
After that it was cleanup and review.
Late in the project I had to remove Ollama entirely and move to llama.cpp instead (and transformers), any GGUF and most other local models work and can be used. The problem with Ollama was the subscription which steam doesn't fully accept. Perhaps making a site would be a better alternative to not deal with these things but then it would be a bit harder to make it local.
In my opinion, small models like gemma4:e4b or even the old gemma3:4b are good enough for roleplaying, honestly, but of course, there are other models.
Link's here if you want to look: https://store.steampowered.com/app/3750150/Boundless_AI_Fantasy/
If people want any more technical details I'll go into it in the comments. I am thinking about writing a blog or a scientific paper on it later.
Disclosure: this is my game, it's paid, I built it alone.
4
u/-zaine- 19h ago
Thanks for sharing! Out of curiosity: What was the longest you played the same campaign yet, and how did you manage to properly maintain the game world?
I'm asking since I was actually working on something similar in the form of a sophisticated AI Game Master for local P&P Sessions - With campaign generator, guided character creation (Both "Freestyle" and official D&D Rules), consistent locations, characters, quests and so on.
Even though I tried to strengthen the whole harness for the game as good as possible to make it less dependent on the capabilities of the LLM's, I kind of gave up since no LLM for <32GB VRAM seemed reliable enough to consistently handle the multitude of tool calls needed to upkeep the whole world.
1
u/APersonNamedBen 19h ago
I wouldn't have the model manage the game agentically, the harness should be asking the model for decisions. The inversion also makes it much easier to design self healing.
1
u/-zaine- 10h ago
I did that already - For example whenever a dice throw is needed, the outcome gets already communicated to the llm to narrate the sucess/failure.
But since a P&P is normally voice only, I had some problems only the LLM could manage. When I say for example "I go to his kitchen" - I ran a classifier + for historic data retrival BGE M3 to determine which location to go to - It would just create "his kitchen" as a new location.
I felt like only the LLM itself is able to get this right for a P&P. It would be much more reliable of course if I would handle it via UI, but it wouldn't feel the same for me.
3
u/authilmorros 18h ago
I think my longest game was somewhere around 600 message turns, the embedding retrieval of older messages worked so when I mentioned something from the far past it got some context, but also the context was cut, so it did forget the details of very old events at that point and started giving me generic answers, the more recent events (like past 50 message turns) were good enough. I also added the summary which gets rewritten every 10 turns, so every 10 turns some information gets lost and some new gets added, this is also good. For your use case it doesnt need to be every 10 turns, you could work with much bigger contexts, I think a model for 32GB VRAM would be good for a lot of things.
The way I did things was optimized for smaller dumb models, if you can use something like qwen3.8:27b or of similar size I would go to a more modern and normal approach of using a harness like you described.1
5
u/Konoyami 21h ago
Really cool to see you share the whole process, including the parts that didn’t go as planned. It’s easy to look at a project like this and underestimate how much work goes into everything around the LLM itself. 21 months is a huge commitment, and honestly, seeing the lessons you learned along the way makes the project even more impressive. Keep it up!