TL;DR
The paper introduces Forking Garden, a novel framework that automatically translates simple story prompts into branching, playable dungeon games. By combining Large Language Models (LLMs) with arc-guided constraint algorithms, the system ensures that both the narrative progression and the underlying gameplay mechanics (such as enemy difficulty and item drops) dynamically adapt to classic emotional archetypes.
What Problem Does This Paper Address?
While Large Language Models (LLMs) have become highly capable of generating text, using them for procedural content generation (PCG) in video games remains a challenge. Current LLM-based story generators often suffer from two major flaws: they lack dramatic tension, leading to flat, homogenized plots, and they fail to connect the narrative structure directly to gameplay mechanics.
Traditional game design relies heavily on narrative archetypes (like the Hero's Journey or a tragic downfall) to create compelling pacing. The authors address this gap by building a system that explicitly models these emotional trajectories—specifically tracking "Rise" (positive/triumphant) and "Fall" (negative/challenging) states—and uses them to dictate both the story branches and the game's actual difficulty.
Methods
The authors propose a generate-first-constrain-later paradigm to decouple creative narrative generation from structural coherence. The pipeline consists of three main stages:
- Node Planning: Given an initial storyline and protagonist (e.g., Little Red Riding Hood), the system brainstorms characters, props, and locations. It then discards the original linear storyline to generate a diverse pool of independent, unconnected plot nodes. Each node is assigned a continuous "soft" narrative state—a blend of Rise and Fall confidence scores—computed using a combination of an LLM and the GoEmotions sentiment classifier.
- Graph Planning: To turn these independent nodes into a coherent game, the system assembles them into a Directed Acyclic Graph (DAG). It evaluates potential connections using a multi-criteria scoring function based on three metrics: Entity Overlap (character/prop continuity), Arc Consistency (alignment with the predicted next emotional state), and Arc Smoothness (penalizing jarring emotional shifts). An LLM then filters the top candidates to ensure causal plausibility.
- Multimodal Game Generation: The finalized graph is exported into the Unity game engine, where each node becomes a playable dungeon room. Crucially, the narrative arc scores drive the gameplay: rooms with high "Fall" scores feature more aggressive enemies and scarcer resources, while "Rise" rooms reward players with powerful treasures. Visual assets are automatically generated using LayerDiffusion and Stable Diffusion v1.5 to create transparent pixel-art sprites.
Datasets
The framework utilizes the pre-trained GoEmotions classifier to extract emotion probabilities from text, which are then mapped to positive (Rise) or negative (Fall) polarities. No new benchmark datasets were introduced, as the core focus is on procedural generation rather than model training.
Key Insights and Ideas
- The Power of Decoupling: Traditional hierarchical story generation often gets stuck in narrow narrative tracks. By generating a massive, unconstrained pool of independent nodes first, Forking Garden achieves much higher narrative diversity and richer branching possibilities.
- Narrative-Gameplay Alignment: Instead of treating story as mere flavor text, the framework treats the emotional arc as a core gameplay variable. A "tragic" turn in the story translates directly to a mechanically punishing boss fight, tightly binding ludic and narrative tension.
- Continuous Arc States: Rather than labeling a scene as a binary "good" or "bad" event, using continuous confidence scores allows for nuanced transitions and finer control over game balancing.
Key Results
The authors successfully implemented their framework into an end-to-end interactive system that generates playable Unity games from text prompts.
A preliminary qualitative user study with six participants revealed that:
- The system was highly engaging and novel for players, who frequently projected personal meaning or performative roles onto the branching narratives.
- Graph generation (creating an initial pool of 20 nodes using a lightweight LLM) took approximately 180 seconds, demonstrating reasonable efficiency for an interactive pipeline.
Limitations and Future Work
Despite its promise, the authors highlighted several areas for improvement:
- Sentiment Bias: The GoEmotions classifier exhibited a systematic negative bias, making positive, "Rise-dominant" archetypes (like Rise-Fall-Rise) much harder to successfully generate under small node counts.
- Pacing and UI: The 180-second generation time lacked a loading indicator, leading to user disengagement during the setup phase. Some item introductions and plot points also felt abrupt in-game.
- Static Difficulty Scaling: The current rule-based difficulty adjustment can overwhelm less experienced players. The authors plan to integrate Dynamic Difficulty Adjustment (DDA) based on real-time player performance.
- Asset Glitches: The automated sprite generation occasionally produced incomplete character renders (e.g., floating heads) or struggled with collective groups (e.g., a "wolf pack"). Future work will explore automated conversion of these 2D assets into skeletal animations.
Summary updated