Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
GPT-4o
12 tokens/sec
Gemini 2.5 Pro Pro
o3 Pro
5 tokens/sec
GPT-4.1 Pro
37 tokens/sec
DeepSeek R1 via Azure Pro
33 tokens/sec
Gemini 2.5 Flash Deprecated
12 tokens/sec
2000 character limit reached

STORY2GAME: Generating (Almost) Everything in an Interactive Fiction Game (2505.03547v1)

Published 6 May 2025 in cs.AI

Abstract: We introduce STORY2GAME, a novel approach to using LLMs to generate text-based interactive fiction games that starts by generating a story, populates the world, and builds the code for actions in a game engine that enables the story to play out interactively. Whereas a given set of hard-coded actions can artificially constrain story generation, the ability to generate actions means the story generation process can be more open-ended but still allow for experiences that are grounded in a game state. The key to successful action generation is to use LLM-generated preconditions and effects of actions in the stories as guides for what aspects of the game state must be tracked and changed by the game engine when a player performs an action. We also introduce a technique for dynamically generating new actions to accommodate the player's desire to perform actions that they think of that are not part of the story. Dynamic action generation may require on-the-fly updates to the game engine's state representation and revision of previously generated actions. We evaluate the success rate of action code generation with respect to whether a player can interactively play through the entire generated story.

Summary

  • The paper introduces Story2Game, an LLM-based system that generates interactive fiction games through a multi-stage process creating the narrative, world, game engine code, and dynamic player actions.
  • Results show high success rates in compiling story actions into code and substantial semantic correctness for dynamically generated actions, supporting both guided narrative and emergent gameplay.
  • Story2Game offers practical benefits by reducing manual coding efforts for interactive narratives and demonstrates a theoretical fusion of narrative theory and game design using emergent AI capabilities.

Generating Interactive Fiction Games with Story2Game

The paper presented introduces Story2Game, a novel approach to generating interactive fiction games using LLMs. The core motivation is to leverage the emergent capabilities of LLMs to not only generate stories but also construct corresponding game engines that support text-based interactive narratives. This allows for a dynamic interplay between storytelling and game state manipulation, affording users a more immersive and flexible experience compared to traditional hard-coded action sets.

Approach

Story2Game delineates a multi-staged process for developing interactive fiction games:

  1. Story Generation: The process commences by utilizing LLMs to generate a story that forms the narrative backbone of the game. Each action within the story is annotated with preconditions and effects which are pivotal for causal and logical consistency within the narrative.
  2. World Generation: Following the creation of a narrative, the game world is populated. The components of this virtual world—rooms, items, and characters—are instantiated based on the narrative needs. This stage constructs the scaffolding upon which interactions are built.
  3. Game Engine Generation: The culmination of the narrative and world structure leads to the generation of executable action code within a game engine. By translating preconditions and effects into code, the game engine facilitates a cohesive interaction experience.
  4. Dynamic Action Generation: Recognizing that players may desire to perform actions not anticipated by initial story creation, the system dynamically generates new actions as they are attempted. This adaptability within the game engine permits emergent gameplay that remains logically grounded within the world’s structure.

Results and Evaluation

The research evaluates the efficacy of Story2Game based on the successful compilation of actions, as well as the semantic coherence of dynamically generated actions. The key metrics include:

  • Compilation Success Rate: The story actions have a high success rate in being translated into executable code, facilitating players' progression through predefined storylines.
  • Semantic Success: The dynamically generated actions exhibit a substantial rate of semantic correctness, where new actions align with intuitive player expectations and logical world mechanics.

The paper showcases how the generation of action code, influenced by LLM-derived preconditions and effects, contributes to creating a grounded yet flexible narrative environment where players enjoy significant autonomy without sacrificing story coherence.

Implications

The implications of Story2Game are multifaceted:

  • Practical: The method reduces the need for manual coding efforts typically involved in creating interactive narratives, proposing a scalable approach for crafting diverse gaming experiences.
  • Theoretical: Concepts of narrative theory and game design intertwine, demonstrating how emergent properties from machine learning models can enhance storytelling and adaptive gameplay.
  • Future Developments in AI: With the rapid advancements in AI, systems like Story2Game pave the way for comprehensive game generation where AI acts as both storyteller and interactive world builder, marking improvements in automated design capabilities.

Conclusion

The paper presents a remarkable step forward in the automated generation of interactive fiction games. Story2Game exemplifies how LLMs can be leveraged to significantly minimize constraints traditionally associated with interactive story creation. This exploration not only enriches the field of game design but also underscores potential avenues for future AI research in creating nuanced, interactive digital content.

X Twitter Logo Streamline Icon: https://streamlinehq.com
Youtube Logo Streamline Icon: https://streamlinehq.com