I’ve been working on an AI-powered RPG where the story evolves in real-time based on player choices. The goal was to combine traditional RPG mechanics (HP, XP, inventory, progression) with dynamic LLM-generated narratives.
Some of the interesting challenges we ran into:
-
Maintaining story consistency across long sessions
-
Preventing narrative drift when users take unexpected actions
-
Managing structured game state alongside free-form text
-
Handling token limits for multi-turn storytelling
Approach:
-
Using layered prompts (system + state injection)
-
Summarizing past events to maintain continuity
-
Separating narrative generation from game logic
-
Tracking player state externally instead of relying on the model
Still experimenting with improving coherence over long sessions and reducing repetition.
Would be interested to hear how others are handling:
-
Long-term memory in interactive apps
-
Narrative consistency in branching flows
-
Cost vs quality trade-offs for real-time generation
We also opened a small beta if anyone wants to test the experience: