Dialogue TreePuzzle

Player chooses from branching conversation options; choices affect relationship state, information revealed, or world flags.

Branching conversation — each choice leads to a different reply and the next set of options.

How dialogue tree works in Godot

A branching conversation is a graph of nodes with choices; each choice can require and set flags. The tree is data — the runtime just walks it.

Resourceprimitive

A DialogueData resource holds lines and choices, each choice pointing to the next node. Writing conversations becomes editing data, not code.

class_name DialogueNode extends Resource
@export var speaker: String
@export var text: String
@export var choices: Array   # [{ label, next, requires, sets }]

Dictionaryprimitive

Flags hide or reveal choices and record what was said, so conversations remember prior turns and branch on world state.

func visible_choices(node):
    return node.choices.filter(func(c): return met(c.requires))

Signalsprimitive

Emit choice_made so picking an option sets flags and advances the node — and lets the wider game react to what the player committed to.

signal choice_made(c)
func pick(c):
    for f in c.sets: flags[f] = true
    goto(c.next); choice_made.emit(c)

In short: DialogueData Resource with node array and branch conditions; choice index → set flag or trigger event

Retro games that use dialogue tree

38 catalogued game(s) use this mechanic, spanning 1985–2000.

Related puzzle mechanics

▶ Explore Dialogue Tree interactively — see every game + the Godot system