IT lexicon › Programming › Dialogue tree

Dialogue tree

Programming På svenska → Updated: 2026-10-27

An in-game conversation modelled as nodes holding lines of dialogue and edges holding the player's possible replies.

Each node is something a character says; each outgoing edge is a choice the player can make. Conditions on the edges — has the quest been finished, is charisma high enough — decide which options appear at all, and nodes can set flags the rest of the game reads later. The name oversells the botany: real conversations almost always loop back to a "what else did you want to know?" hub, so the structure is a graph, not a tree.

Early games hard-coded dialogue. Today it lives in dedicated formats that writers can edit without a programmer in the loop: Inkle's ink, open source since 2016, and Yarn Spinner, best known from Night in the Woods. Combinatorial explosion remains the eternal problem — every choice that "matters" doubles the amount of text to be written, translated and recorded by voice actors.

← Back to the lexicon