We need to talk ...

Dialogue systems! I've been throwing around some ideas on how to modernise the traditional systems we're used to. We will most likely end up with a traditional system for this game for a couple of reasons. In this post I would like to discuss how I envisioned a dialogue system, why we didn't go for it this time and what we're doing instead.

One flaw with the normal systems, in my opinion, is that they're not good for player agency. Sure, the player can choose between a given set of phrases to say, but they're pretty limited in what topics to choose from in a given conversation.

At first I wanted to test out a keyword-based system (think Final Fantasy II or TES III: Morrowind) where the player can direct the topics and flow of the conversation in a more dynamic way. The player would learn keywords through dialogue and would be able to bring them up later in conversation with other characters to learn new information. The goal would be to give the player more control, make them feel smart when solving dialogue puzzles and maybe even integrate dialogue better with existing mechanics (an inventory for keywords, combinable with regular inventory items, maybe?).

 Example of a topic based dialogue system from Morrowind

Example of a topic based dialogue system from Morrowind

As I said earlier, we will most likely not end up exploring this further. The reasons are varied, but I'll go through some of them here.

It must make sense. Why do we have topics? There should be a reason to include them that meshes well with the overall gameplay, and we didn't manage to find one compelling enough. We could include it, but it's better to kill your darlings, as Faulkner put it, than to include a half-baked 'great' idea.

Amount of work. A big risk with this system is if too few characters have unique dialogue about a topic. It will feel stale really fast and could kill immersion outright. When it feels like the characters are closer to a walking encyclopedia than a real person, the illusion breaks. To combat this, we would need to write a lot of dialogue for each character. This is a hobby project for us, so we would rather prioritize finishing the main parts of the game before investing a substantial amount of time in something we haven't made complete sense of yet.

Design noise. We're amateurs when talking about game design. I believe that including a lot of different or novel mechanics in our first game will only serve to make us lose direction and create an unfocused experience for the player.

After having talked a lot about what we're not doing, I would like to share a bit of what we are doing.

We will end up with a pretty traditional dialogue system in the vein of Lucasarts (and everyone else at that time), but how do we write the dialogue? It should be easy for the editor to create and review.

I started out doing research on existing solutions like Dialogue System for Unity and ChatMapper. They seemed like great tools, but I was left with a feeling of 'overkill'. Do we really need as sophisticated tools as that to create a dialogue graph? I don't think so, and I hope I am right, as I've spent some time creating a lightweight solution for our project now.

One other issue was how to integrate with the rest of our system. We've already made a lot of scripts dealing with interactions, inventory, state etc. and it would be great to be able to integrate our existing scripts with the dialogue editor.

After a couple of evenings I'm finished with a (workable) proof of concept for our dialogue editor which is tightly integrated with the rest of our code, so new types of interaction within the game world will also be possible to connect to dialogue lines. We can for example add or remove items from the inventory, play animations and sound, trigger global state and much more for each line of dialogue.

I started out with a very lightweight node editor I found here. I extended that with support for modifying nodes in the inspector window, multiple incoming and outgoing connections per node and possibilities to mark initial dialogue lines and lines that will end the dialogue.

Example of how to create dialogue in the editor

There is still a lot to do, but it works fine right now. I need to make a custom editor so we only need to see the important parts when editing. For example, the inspector does not need to show the position on the canvas as that is updated by dragging.


I'm also experimenting with different view modes, so we are able to switch between line view and box view for each node.