Categories
Games Programming Projects

splinter-keep: A Text RPG with a local LLM as Dungeon Master

splinter-keep — it calls itself “The Chaos” in-game — is a terminal RPG where an LLM runs the whole game: it narrates the scene, offers you choices, resolves whatever you type back, and rolls dice behind the scenes against a genuinely simple d6-based rules system. Every turn gets appended to a running story book, so by the time a campaign ends you’re left with something that actually reads like a book rather than a chat log.

The whole game loop lives in one terminal app — there’s no separate “DM” service and “player” client, just a TUI that calls the LLM directly for every scene and every outcome. The interesting constraint was making that work with a local model running on my own GPU instead of a hosted API. I went through a lot of different local models while building this, and every single one had its own quirks and failure modes: refusing to follow the output format, inventing rules, forgetting inventory, that sort of thing.

It only became reliably playable once I added real guardrails: a strict structured output format the LLM has to fill in every turn — choices, log line, state changes, as a JSON block — and a second, separate LLM call whose only job is to check whether the player’s action is even valid given the current character and world state, before the main narrative call runs at all. That second-opinion step mattered more than any single prompt tweak.

Even with all that, I’ll be honest: the actual writing quality of a small local model is nowhere near what you get from pointing the same code at a larger hosted model instead — the game supports both, swappable in config, and the difference in prose is obvious. But getting a local model to behave at all, reliably, turn after turn, was most of the fun here. Still a great experience playing around with LLMs either way.

Full architecture notes, the rules system, and the code for both the guardrails and the LLM strategies are in the splinter-keep repository.

Categories
Games Open source Programming Projects

Moon Bus :: PICO-8 game

I couldn’t resist the temptation to get down to coding a game like it was the 1980s again: small screen, huge pixels, 8-bit values, limited resources, limited instruction set, lots of fun.

PICO-8 is a fantasy console that only ever existed as an emulator. But oh boy, what a fun and well executed concept. I bought the license (sic, this is not a free nor open source software) so that I could play it on my Anbernic RG35XX H emulator console. And it is an amazing experience, being able to play 8-bit retro games that are freshly released and wirelessly downloaded onto a handheld device.

Since PICO-8 provides an all-in-one environment for games development, I decided to give it a try. Enter Moon Bus. This is a simple ‘Lunar Lander’-like game, where you have to travel from station to station, landing several times in a row to carry passengers around a low-gravity planet. I had a lot of fun building this and subsequently playing this on my handheld.

You can find the game on the official PICO-8 site: Moon Bus at www.lexaloffle.com

I love that there are still options to get into simple programming, without any need for massive frameworks and libraries. It is a refreshing experience and it really reminds me of coding way back when you didn’t have that many options or expectations. You definitely don’t need a cluster of GPUs to compile shaders like with other current platforms.