LLM-Driven NPCs: Cross-Platform Dialogue System for Games and Social Platforms
Li Song
TL;DR
This paper tackles the limitation of static NPC dialogue and platform confinement by enabling LLM-driven NPCs to converse across a Unity game and a Discord social environment. It proposes a prototype architecture that uses LeanCloud as a shared memory store and a simple favorability metric to modulate responses. Experiments validate cross-platform memory retention and platform-aware behavior using the DeepSeek-R1 model. The results demonstrate technical feasibility and establish a foundation for integrating emotional modeling and longer-term persistent memory via retrieval-augmented techniques. The approach broadens NPC interaction beyond the game client, laying groundwork for persistent social companions in interactive storytelling.
Abstract
NPCs in traditional games are often limited by static dialogue trees and a single platform for interaction. To overcome these constraints, this study presents a prototype system that enables large language model (LLM)-powered NPCs to communicate with players both in the game en vironment (Unity) and on a social platform (Discord). Dialogue logs are stored in a cloud database (LeanCloud), allowing the system to synchronize memory between platforms and keep conversa tions coherent. Our initial experiments show that cross-platform interaction is technically feasible and suggest a solid foundation for future developments such as emotional modeling and persistent memory support.
