Skip to main content
QUICK REVIEW

[Paper Review] PANGeA: Procedural Artificial Narrative using Generative AI for Turn-Based Video Games

Steph Buongiorno, Lawrence J. Klinkert|arXiv (Cornell University)|Apr 30, 2024
Artificial Intelligence in Games4 citations
TL;DR

PANGeA introduces a novel framework that leverages large language models (LLMs) to generate narrative-consistent, dynamic dialogue and procedural content in turn-based RPGs, using personality-biased NPCs and a server-side memory system to maintain narrative coherence despite free-form player input. Empirical evaluation demonstrates its effectiveness in aligning LLM responses with evolving narratives across two demo games.

ABSTRACT

This research introduces Procedural Artificial Narrative using Generative AI (PANGeA), a structured approach for leveraging large language models (LLMs), guided by a game designer's high-level criteria, to generate narrative content for turn-based role-playing video games (RPGs). Distinct from prior applications of LLMs used for video game design, PANGeA innovates by not only generating game level data (which includes, but is not limited to, setting, key items, and non-playable characters (NPCs)), but by also fostering dynamic, free-form interactions between the player and the environment that align with the procedural game narrative. The NPCs generated by PANGeA are personality-biased and express traits from the Big 5 Personality Model in their generated responses. PANGeA addresses challenges behind ingesting free-form text input, which can prompt LLM responses beyond the scope of the game narrative. A novel validation system that uses the LLM's intelligence evaluates text input and aligns generated responses with the unfolding narrative. Making these interactions possible, PANGeA is supported by a server that hosts a custom memory system that supplies context for augmenting generated responses thus aligning them with the procedural narrative. For its broad application, the server has a REST interface enabling any game engine to integrate directly with PANGeA, as well as an LLM interface adaptable with local or private LLMs. PANGeA's ability to foster dynamic narrative generation by aligning responses with the procedural narrative is demonstrated through an empirical study and ablation test of two versions of a demo game. These are, a custom, browser-based GPT and a Unity demo. As the results show, PANGeA holds potential to assist game designers in using LLMs to generate narrative-consistent content even when provided varied and unpredictable, free-form text input.

Motivation & Objective

  • To address the challenge of maintaining narrative coherence in LLM-driven turn-based RPGs when players input free-form text.
  • To generate procedurally diverse game content—including settings, items, and NPCs—while ensuring narrative consistency.
  • To enable dynamic, personality-informed NPC interactions using the Big 5 personality model.
  • To develop a scalable, game engine-agnostic system with a REST and LLM interface for integration.
  • To validate the framework’s ability to align LLM responses with procedural narratives under varied input.

Proposed method

  • PANGeA employs a server-hosted custom memory system that stores and retrieves narrative context to inform LLM-generated responses.
  • It uses a validation mechanism where the LLM itself evaluates and filters responses to ensure alignment with the current narrative state.
  • NPCs are generated with personality traits drawn from the Big 5 model, influencing their dialogue generation via prompt engineering.
  • The system integrates with game engines via a REST API, enabling real-time communication between the game and the LLM backend.
  • It supports both public and private/local LLMs through a flexible LLM interface, enhancing deployment adaptability.
  • Procedural game content (settings, items, NPCs) is generated using LLMs guided by high-level design criteria from game designers.

Experimental results

Research questions

  • RQ1Can LLMs generate narrative-consistent dialogue and content in turn-based RPGs when faced with free-form player input?
  • RQ2How effective is a server-side memory system in maintaining narrative coherence across dynamic player interactions?
  • RQ3To what extent do personality-biased NPCs enhance immersion and narrative consistency in procedural game worlds?
  • RQ4How does the LLM-based validation system reduce off-narrative or irrelevant responses?
  • RQ5Can PANGeA be effectively integrated into diverse game engines using a standardized API?

Key findings

  • PANGeA successfully maintains narrative coherence even when players enter unpredictable, free-form text inputs.
  • The integration of a server-side memory system significantly improves the contextual relevance and continuity of LLM-generated responses.
  • Personality-biased NPCs produce more immersive and consistent dialogue that aligns with the evolving narrative.
  • The LLM-based validation system reduces off-topic or irrelevant responses by filtering and re-evaluating outputs in real time.
  • Empirical evaluation across a browser-based GPT demo and a Unity-based demo confirms PANGeA’s effectiveness in generating consistent, dynamic narratives.
  • The framework demonstrates scalability and compatibility with both public and private LLMs through its REST and LLM interface design.

Better researchstarts right now

From reading papers to final review, dramatically reduce your research time.

No credit card · Free plan available

This review was created by AI and reviewed by human editors.