Aboo | DevLog 06

I wanted to talk a bit about how I built my own dialogue system. This isn’t a tutorial (I have zero experience with things like this), more like a way to start a conversation on the topic.
There are a few ready-made dialogue systems for Godot — even node-based ones... But I didn’t want to dig through someone else’s spaghetti code. I needed to make it myself just to understand how it actually works.
How does it work?
When the player touches an Area2D
trigger, the dialogue either starts automatically or shows an indicator — so the player can press a button to begin. That trigger sends an array to the dialogue system. The trigger can also be turned on or off using variables from the dialogue itself. Pretty simple overall.
How is the dialogue stored?
I tried a few formats — something like ScriptableObjects, dictionaries... but in the end I just used a plain array. Seems like that’s what most people do anyway. Each line in the array is a single “step” in the dialogue. There are different types of steps:
Text — shows regular dialogue text
Avatar — displays a portrait
Random — shows a random phrase from a group (2 to 10 options)
Variable — changes a variable in the database (add, subtract, or set a value)
Question — shows a question with 2–3 answers, each linked to a “label”
Anchor — a point the dialogue jumps to when an answer is chosen
Jump to Anchor— instantly moves the dialogue to a specific label
Exit — ends the dialogue
How does it run?
The dialogue system gets the array from the trigger and runs through each step, handling it based on its type. That’s it.
Why build a custom editor?
In theory, I could edit the arrays manually in the inspector. But that’s a pain. Same for editing JSON or XML files...
In Unity, you can customize the inspector for things like this. In Godot — not really (at least not that I know of). But you can make your own “extension”, and it’s built like a game — it’s just a regular scene from the game.

The extension is just a scene with the same UI as in the game
Here you can clearly see the difference between editing in the inspector and using my custom editor:

Bottom-left: my editor | Right: the inspector
Creating a dialogue in the game
Just showing how it all works inside a real location:
First, I create a root node — to keep the scene tree clean
Then I drop in a pre-made
Area2D
prefab from my assets (with the script already attached)I add a trigger shape as a child (I don’t use a prefab here, since the shape of the dialogue zone can be different each time)
When the trigger is selected, the dialogue editor opens — I fill it in, press play, and it all just works.
What’s next?
For this game, I probably won’t change the dialogue system anymore — just fix things as they come up during development. Later, I might try to separate it from the game and turn it into a standalone system that I can reuse in future projects. But that’ll happen slowly... over time.
That’s it, really. Thought there would be more words :)
Anyway, feel free to tell me everything I did wrong — and how it’s supposed to be done!
Originally written in 2020 — just keeping the vibe.
The original Russian version is here: Gamin.me — Как сделать маленькую игру (часть 6)
Comments