← All posts ·

Why Your AI Game Master Lies

Why Your AI Game Master Lies

Have you ever tried playing D&D with an AI assistant like ChatGPT or Gemini? Then you know the drill. First comes the "wow" factor: vivid descriptions, decent rule knowledge, and unexpected world reactions. But then comes the frustration: math errors, blatant bias, and memory lapses. What started as an exciting game quickly turns into a surreal mess.

Unfortunately, LLMs can't do math the way humans do. They simply pick the most contextually plausible value, which isn't always correct. Memory issues stem from context window limits and attention mechanisms: after ten turns, the model starts mixing up player and enemy HP, forgetting initiative order, or dropping the location you were in two scenes ago. Give the model a pre-made adventure module, and soon enough, it will only remember the general concept and the main boss. Finally, LLMs are trained to avoid conflict and keep the user happy. To them, game rules are just decorative text, not hard boundaries. This causes endless hand-holding that prompt engineering can't fix, turning the whole session into one continuous hallucination.

That's why we decided to build our own engine for text-based RPGs: RuleScroll. We use an event-driven parallel pipeline built on a strict separation of concerns: AI handles natural language comprehension, while code handles memory and math.

RuleScroll pipeline diagram: AI understands language, code handles math and memory

When a player submits a complex action (e.g., "I jump over the table and strike the orc"), we process it in stages. First, the AI breaks down the prompt into atomic actions and builds a dependency graph. It also determines if skill checks are required, like an Athletics check for the jump. Next, if the dice roll fails the first action (the jump), the code automatically blocks or cascades changes down to all dependent actions (the strike). That part is handled strictly by code. This approach guarantees logical consistency without AI fudging the rules.

The AI also evaluates what world reactions each action might trigger. Multiple LLMs judge, validate, and assign checks or saving throws in parallel. Conflicting rulings are resolved by code using preset rules. Take that same attack on the orc: if one model blocks the action ("you can't attack before rolling initiative") and another approves it, the code delays the attack until initiative is resolved. If the player wins initiative, the attack goes through. If the orc wins, the engine takes the orc's turn first. Meanwhile, all underlying calculations — d20 rolls, stat modifiers, HP tracking, and attack limits — are executed purely by code.

Finally, the narrator AI doesn't receive the player's raw input. Instead, it gets a technical report from the engine: what succeeded, what was rolled, and how much damage was dealt — the "skeleton" of the response. The narrator's sole job is to translate those dry facts into atmospheric text, with zero ability to alter the actual outcome.

The result gives players the full freedom of open text input, firmly anchored by game rules and world consistency.

Rendered turn log in RuleScroll

This is exactly what we set out to achieve with RuleScroll. We wanted to preserve the magic of AI-driven freedom while eliminating hallucinations, math errors, and memory loss. It feels like we're on the right track.

We're running a closed Russian playtest on Telegram. An English Discord preview of the same engine is next. If you want in then, join the waitlist — we're looking for people who try to break games.