Adding a Godot Dialogue System to Our Game, a Devlog
Our platformer had six characters who needed to talk, and every line of their dialogue was hardcoded into a label node with a timer. Changing one typo meant opening a scene, finding the right node and hoping nothing else broke.

Our platformer had six characters who needed to talk, and every line of their dialogue was hardcoded into a label node with a timer. Changing one typo meant opening a scene, finding the right node and hoping nothing else broke. This devlog covers how we replaced that mess with a small Godot dialogue system over about three weeks, what we got wrong, and what we would do differently.
We are a three person team working in Godot 4.2. None of this needs plugins, and the core of it is under 300 lines of GDScript.
Where we started and why it broke
The first version was simple. Each NPC had an Area2D, and when the player entered it, a script set the text of a Label and started a two second timer. It worked for a jam build. It stopped working when we had 140 lines of dialogue, two branching conversations and a writer who does not use the Godot editor.
Three specific problems pushed us to rebuild:
- Our writer had to send lines in a chat message, and someone had to paste them into the right node.
- There was no way to branch based on whether the player had found an item.
- Text appeared all at once, so players skipped it, then asked in playtests where to go next.
We had already done a similar rebuild for saving, which we wrote up in our Godot save system devlog. That experience made us more willing to stop patching and design something small and proper.
Designing the Godot dialogue system around data
The key decision was to move all dialogue out of scenes and into JSON files, one per conversation. Each file holds a list of nodes. Each node has an id, a speaker, a line of text, and either a next id or a list of choices.
A typical node looks like this in plain terms: id "intro_2", speaker "Wren", text "The bridge went out in the storm.", next "intro_3". A choice node has two or three options, each with its own label and target id, plus an optional condition such as has_item "rope".
Why JSON and not Godot's own Resource files? Our writer edits in a text editor and can read JSON after five minutes of explanation. Resources would have tied every edit to the engine. If your whole team lives in Godot, custom Resources are a fine choice and give you editor validation for free.
The three pieces
- DialogueLoader, an autoload that reads a JSON file and returns a dictionary keyed by node id. It also checks every next and choice target exists and prints a warning listing any broken ids.
- DialogueRunner, a plain Node that tracks the current node, evaluates conditions against our game state autoload, and emits signals: line_started, choices_shown and conversation_ended.
- DialogueBox, a CanvasLayer scene with a speaker name label, a RichTextLabel for text, and a VBoxContainer that fills with buttons when choices appear.
Splitting runner and box was the best call we made. The runner does not know anything about UI, so we could test branching with print statements before a single pixel was drawn.
Typewriter text and the skip problem
We added a typewriter effect using RichTextLabel's visible_ratio property, tweened from 0 to 1. At first we used a fixed 1.5 second duration per line. Short lines crawled and long ones flew past.
Switching to a per character speed fixed it. We settled on 0.03 seconds per character, so a 60 character line takes 1.8 seconds. Pressing the interact key once completes the line instantly. Pressing it again advances. Playtesters stopped mashing through text after this change, and the number of people asking where to go after the bridge scene dropped from five of eight to one of eight.
One gotcha: visible_ratio counts BBCode tags differently in some cases, so a line with color tags sometimes snapped to full early. Using visible_characters with get_total_character_count fixed that.
What broke along the way
Week two was mostly bugs. The worst was a softlock: if the player walked out of an NPC's area during a conversation, the area's exit signal closed the box while the runner still thought it was mid conversation. The next NPC would not start. The fix was making the runner the single owner of state. The box only listens. Areas ask the runner to start, and the runner refuses if a conversation is already running.
The second bug came from controller input. Our choice buttons did not grab focus when they appeared, so gamepad players could not pick anything. Calling grab_focus on the first button, deferred by one frame, solved it.
Third, our writer accidentally reused an id in two files. Because each file loads separately, it did not crash, but one branch jumped into the wrong conversation. We now prefix ids with the file name, such as bridge_intro_2.
Why we skipped the popular plugins
The common advice is to install Dialogic or Dialogue Manager and move on. Both are good tools, and for a narrative heavy game they would probably save time. We pushed back on that advice for our project, for a specific reason.
Our game has about 15 minutes of total dialogue. A full plugin brings its own editor, file format, and update cycle, and we would have spent a week learning conventions we only needed 10 percent of. Our hand built system took roughly 22 hours of work total and every line is code we understand. When something breaks during a jam or a demo, that matters more than features.
If we were making a visual novel or an RPG with hundreds of branches, we would reverse this decision. Scope should drive the tool, which is the same lesson we wrote about in cutting features from our game.
Numbers after three weeks
| Measure | Before | After |
|---|---|---|
| Time to fix a typo | About 4 minutes | Under 30 seconds |
| Lines of dialogue | 140 | 212 |
| Branching conversations | 2, hardcoded | 9, data driven |
| Dialogue related bugs open | 11 | 2 |
The writer now commits JSON directly to our repository, and the loader's validation catches broken ids before anyone runs the game. Writing these notes as we went also kept us honest about what took longer than planned, which is the main reason we keep a devlog that helps us finish.
Frequently asked questions
How do you make a dialogue system in Godot?
Store dialogue as data, such as JSON or custom Resources, then write a runner node that tracks the current line and emits signals. A separate UI scene listens to those signals and shows text and choices. Keeping logic and display apart makes it easier to test and change.
Should I use Dialogic or build my own dialogue system?
For story heavy games with many branches, a plugin like Dialogic or Dialogue Manager will usually save time. For small games with a few minutes of dialogue, a custom system of a few hundred lines is often faster to build and easier to debug.
How do you make typewriter text in Godot 4?
Use a RichTextLabel and tween its visible_characters property from 0 to the total character count. Base the duration on line length, around 0.03 seconds per character, and let one key press complete the line instantly before the next press advances.
More in Devlogs
Devlogs
Adding Sound and Music to Our Godot Game, a Devlog
We shipped the platformer demo to eleven playtesters with no audio at all, because audio was the thing we kept pushing to next...
Devlogs
Adding Godot Screen Shake and Hit Stop, a Devlog
The most upvoted comment in our last feedback thread was four words long: "hits feel like nothing." Eleven other players agreed...
Devlogs
Adding Controller Support to Our Godot Game, a Devlog
Three of the first ten people who played our demo picked up a gamepad, pressed A on the title screen, and nothing happened.