Introduction
During our Bachelor thesis at SAE Geneva, we had to produce a media project around our research question.
Mine was:
How to dynamically generate dialogues in role-playing video games using AI? An analysis focused on reducing redundancy and enhancing immersion through adaptive contextual dialogues.
To support this, I created a Unity project that communicates with DeepSeek to generate basic secondary dialogues based on multiple narrative layers.
Concept
The project is composed of two dioramas based on Natural and Kawaii universes. Three companions are placed in these dioramas, and you can interact with them to trigger generated dialogues based on their personalities.
📽️ See the presentation slides
🗡️ Preview 🌿
Work in progress
AI, Prompt Engineering and Narrative layers
My approach to prompt engineering is based on insights from academic theses and is structured around six narrative layers: visual environment, gameplay impact, game lore and backstory, character psychology, player guidance through hints, and the player’s influence on the world and relationships. To generate dynamic and varied dialogue, I rely on four exemple dialog structures and a weighting system where each layer can be emphasized (+) or minimized (−). This method helps avoid repetitive outputs, which I found often occurred when all context was fed into the model equally. The prompt itself is generated in Unity using data from the game’s current state and character profiles. It is then sent to DeepSeek’s API for generation via structured JSON communication.