Creating the perfect dialog box.

Dialog boxes are one of the staple elements of RPGs. They're used to convey what characters are saying in the game world to the player. It's a UI element the player is going to see over and over again, so it's worth doing well! Luckily it's very easy to make a simple functional dialog box that can be iteratively improved to get an awesome final result.

Why Not Voice?

Games these days are all about voice. Even Indie games are making great use of voice. Are dialog boxes really any use any more or are they a relic of the past? Voice has distinct advantages; it's immersive and carries far more emotional information than plain text. Additionally if you manage to snag a well known actor then you can tap into their audience and expect your game to get more media attention than it would otherwise receive. But did audiobooks replace the novel? No, and there's a reason for that: they cater to different audiences.

Here are the reasons why you might avoid voice acting.

  • Voice limits the scope of your game. (Due to expense, production lead times and logistics of getting it recorded).
  • Voice acting is expensive. (artifical voices might make things cheaper in the future)
  • Voice acting really requires the sound to be sync'ed to the correct mouth shapes.
  • People can read faster than they can listen. Reading a page of text is fine, listening to it can be grating.
  • Written text allows games to have greater information density.
  • The player is free to interpret the voice as they desire rather than having it dictated.

What problem do dialog boxes solve?

Dialog boxes try to convey speech by characters in the game world. The text types in word by word mimicking how we speak, in real-life, each word one after the other. Speech is used to help advance the story and flesh out the game world.

Speech via dialog box shouldn't be annoying or boring. If the text has poor contrast or an odd font choice making it hard to read; then that's annoying. If there are pages and pages of text, or the display transition is slow and unskippable then that quickly gets boring.


Our poor human brains evolved in the physical world and in the real world things rarely appear spontaneously. If a dialog box doesn't exist one frame and the next frame it takes up a third of the screen, full of dense text, that's a jolt! Our lizard brain is screams "Where did that come from!?". We don't want our dialog boxes to give players a jump-scare so we should give little lead in.

Dialog boxes should use in and out transitions. These transitions vary from game to game but they tend to be a combination of moving, scaling and fading-in. A box might scale up from the center or just fade it's opacity from zero to one.

A dialog box should ideally reinforce your game themes. A vampire game might have a box rise out of mist, a light hearted adventure might have a scale with a bounce at the end, a hacker game might have a terminal the pops up from the bottom of the screen. Experiment, the player is going to be seeing these transitions a lot. This is a also another place to consider reinforcing character personality, maybe some characters have their own custom transitions.

In the field of human-computer-interaction there's a term response time limit that describes how quickly an on-screen animation must occur for the user to feel like they caused it. The term response limit means that the computer must react to human input in less than 0.1 seconds. The dialog box must be visible within this time for a snappy responsive game.

Features of an Excellent Dialog Box

  • Have dialog box in/out transitions but keep them brief. Let the player read the text, that's the meat!
  • Spoken text should type into the box.
  • Support different type in speeds (to show a pause or consideration on behalf of the speaker).
  • Let the player cancel the text type in and jump to the fully displayed text.
  • Support symbols in the text.
  • Support colored text.
  • Have some way of indicating the speaker (portrait, title or speech bubble trail that comes from the speaker).
  • Use an indicator to show if there's more text to read.
  • Layout out the text ahead of time to stop words jumping from one line to the next due to word wrapping.

When making the dialog box make something functional first then build in the features that you want. Any good dialog box almost dictates that you'll need to have a special script to support text coloring, speed and actions in the game world (such as animations or facial expressions). Don't worry too much about the scripting but be aware of it as you build your system.

Take Aways

Play an RPG and you're going to see a lot of dialog boxes. Therefore it's worth spending a good amount of time making a beautiful dialog boxes that are pleasant to use. Take the time to make the text type in and in all your decisions consider the player first! Make a list of features you want your dialog to support and then add them one at a time.

Some player's just want to kill things and will try and get through any dialog as quickly as possible, don't try and re-educate the player, make it easy for them to play how they want to play.