Project (Master Thesis)
StoryGen AI
Generative Narrative Support for Video Games Hybrid AI-driven system for the generation of interactive video game narratives with the goal of supporting the creative work of game designers and narrative designers.
The project addresses one of the central challenges of modern game development: managing narrative complexity while preserving coherence, player agency, and creative control across long, branching storylines.
As contemporary video games increasingly rely on complex narrative structures, branching paths, and rich character development, traditional manual approaches to storytelling become harder to scale. This thesis investigates how Large Language Models (LLMs) can be integrated into a structured narrative framework to assist designers during brainstorming, story prototyping, structural planning, and coherence validation, without delegating authorship entirely to the AI.
The core idea behind the project is an AI-assisted co-creation pipeline, where human creativity remains central. The system does not autonomously generate finished stories, but instead acts as an intelligent narrative engine that operates under formal constraints, interprets narrative structures, and produces controlled outputs that designers can inspect, modify, and refine.
At the architectural level, the system is built around a multi-step narrative generation pipeline, designed to reduce the typical weaknesses of generative models when dealing with long-form storytelling. The pipeline is divided into progressive stages, each focusing on a different narrative layer: structural generation, chapter breakdown, detailed story expansion, automated validation, and final synthesis. By separating concerns and progressively refining the output, the system maintains logical consistency, character continuity, and thematic coherence across the entire narrative.
Narratives are internally represented as graph-based structures, where nodes correspond to story events or states and edges define causal, temporal, or branching relationships. This representation enables the system to naturally model interactive storytelling patterns such as acts, branching choices, alternative paths, and player-driven progression. The graph structure also allows designers to visually inspect and reason about narrative flow, bottlenecks, and dependencies.
To guide the AI’s creative output, the system integrates structured prompting techniques, semantic embeddings, and curated narrative resources inspired by established storytelling frameworks. These include classical narrative models such as the Hero’s Journey, multi-act structures, and trope-based storytelling systems. Rather than relying on free-form text generation, the AI operates within a controlled narrative space, balancing creativity with predictability and design intent.
From a technological perspective, the system follows a client–server architecture. The backend, implemented in Python, manages the narrative pipeline, AI interactions, validation modules, and asynchronous job execution through RESTful services. The frontend, developed in Unreal Engine, provides an interactive environment tailored to game designers, allowing them to trigger generation steps, visualize narrative graphs, explore generated chapters, and analyze story consistency directly within a game development context.
A key contribution of the thesis is its explicit positioning of AI as a creative support tool rather than a replacement for human authorship. The system is designed to accelerate ideation, explore narrative alternatives, reduce repetitive structural work, and assist in consistency checking, while leaving creative decision-making firmly in the hands of the designer. This human–AI collaboration model reflects a practical and ethically grounded approach to generative AI in creative industries.
Use arrows to browse media