Journal //

Creating a Dynamic Dialogue Generation System for Role-Playing Games

17 March 2026

One of the areas I have been most interested in since graduating from university is autonomous AI agents in game environments. I am deeply interested in how we can create autonomous behaviour in video games that feels believable, responsive, and interactive.

The problem is a very broad field of development, and creating autonomous agents would be a lifelong mission, something that would need a huge amount of hours and planning to create.

I've decided to focus on the narrative aspect of autonomous agents, allowing players to interact with responsive, context-aware entities in a game world. This system will be powered by LLMs, orchestrating dialogue generation using information which can be translated and inferred from the game world.

This project will focus on three key areas: context-aware and immersive dialogue, refined and coherent memory retrieval and generation, as well as a system for emotion appraisal of events. These systems will work in tandem to create immersive, emotionally intelligent dialogue, further empowering immersion in games.

Implementation

The project will be an API, which different games/systems can send requests to create dialogue. The API will be written in Rust using actix-web. It will support Ollama for rapid development and testing as well as using local models to save on cost.

I've also determined that I will be separating the project into three further components. The dialogue API itself, which will be responsible for orchestrating and generating dialogue, a game made in Godot to show off a demo of the system working, and a tooling crate or library, which will help test and log API interactions between the game and the system.

Conclusion

I believe that creating autonomous and interactive AI agents will be beneficial to game development, producing more content for players and creating ever-changing worlds that increase immersion and interactivity. Though this will be a complex problem to solve, in time it will bring new experiences and new worlds.