Fun-Aware Modeling and Narrative Generation Using LLMs for Role-Playing Games
Creating engaging narratives for role-playing games (RPGs) remains a challenge. Traditional handcrafted and branching story systems offer limited adaptability, while large language models (LLMs) typically optimize linguistic quality rather than player enjoyment. To address this gap, this study proposes a fun-aware LLM-based narrative generation framework that treats fun as a dynamic, multi-dimensional signal guiding iterative story generation. The framework evaluates narrative segments using six interpretable features: surprise with coherence, agency density, tension oscillation, narrative payoff ratio, tonal variability, and rule-bending moments. A human-subject study involving 24 participants showed that fun-aware narratives significantly improved perceived enjoyment, player agency, novelty, and replayability compared with baseline LLM-generated narratives while maintaining narrative coherence. Correlation analysis further revealed strong agreement between computational fun estimates and human enjoyment ratings (<inline-formula> <tex-math notation="LaTeX">$r = 0.71$ </tex-math></inline-formula>), supporting the validity of the proposed metrics. To further evaluate the framework, 80 paired RPG narratives comprising 944 narrative segments were generated under controlled conditions. Compared with baseline narratives, the fun-aware framework produced higher composite fun scores (<inline-formula> <tex-math notation="LaTeX">$M = 5.82$ </tex-math></inline-formula> vs. 4.71), greater event novelty (<inline-formula> <tex-math notation="LaTeX">$M = 6.77$ </tex-math></inline-formula> vs. 4.91), and richer branching structures (<inline-formula> <tex-math notation="LaTeX">$M = 2.34$ </tex-math></inline-formula> vs. 1.58 choices per segment). These findings suggest that modeling fun as an explicit design objective can improve both player-perceived engagement and computational measures of narrative diversity and interactivity without compromising narrative coherence.