Two microphones on a rehearsal table with a draft script.

How to write game dialogue — practical guide and examples

Write game dialogue by giving each speaker a concrete goal, making player choices express clear actions, and connecting each action to a response and consequence. Then read and test every route. A line succeeds when it sounds like its speaker and helps the player understand what they can do next.

Start with one short scene. You can learn more from making two choices meaningfully different than from drafting a long conversation whose branches all sound alike.

Give each speaker a goal and a way of speaking

In this original teaching scene, The Night Archivist, the player wants to view a ledger before lockup. Archivist Cora wants the ledger safe. Those goals create a small negotiation: what will persuade her to permit access, and under what arrangement?

Cora speaks in inventory shorthand: short statements, concrete objects, few pleasantries. Her opening line names both the closing constraint and her priority:

Lockup next. Ledger stays here.

The subtext is the concern beneath the literal words: Cora needs assurance that the ledger will remain safe. You do not need a speech explaining her professional responsibilities. Let that concern shape what she notices, what she accepts, and how she responds.

Give other characters their own patterns. One might soften a refusal with an apology; another might answer a question with a question. Choose patterns that serve their goals, then leave room for variation so the pattern does not become a verbal tic.

Replace vague lines with playable intent

A vague choice makes the player guess what selecting it will mean. An interchangeable response makes the character sound detached from the action.

Before — player choice: Help me out.

Before — Cora’s response: Of course. I understand how important this is to you.

The choice does not specify what the player is asking Cora to do. Her answer could belong to almost anyone, and it leaves the viewing arrangement unclear.

After — player choice: Check my badge. Stay while I read.

After — Cora’s response, following the badge check: Badge checked. Ledger open. I stay.

The revision gives the player an action and an expected arrangement. Cora’s answer acknowledges the evidence, grants viewing, and confirms her supervision. Its clipped rhythm also belongs to her.

Keep the words that carry intention, character, or consequence. Cut explanations that merely repeat what the player has just chosen.

Write the choice before the response

A choice label is a promise about the action the player will attempt. If it offers supervised reading, the resulting scene must provide supervised reading. If it offers reading alone, the response must establish that arrangement.

The following scene has three possible player choice fields. The seal choice appears only when the player has the courier seal. The badge choice is always available: Cora checks the badge during that route, so it requires no prior verification.

Opening cue and player choices

D0 · C0 · Cora: Lockup next. Ledger stays here.

Player lines shown before selection:

  • D1: Check my badge. Stay while I read. Always shown.
  • D2: Take this courier seal. Let me read on my own. Shown only when has_seal=true.
  • D3: I’ll leave without viewing the ledger. Always shown.

Responses after selection

After D1: Cora checks the badge in the scene. Once she has checked it, set trust=verified and access=supervised.

C1 · Cora: Badge checked. Ledger open. I stay.

After D2: The player hands Cora the courier seal. Set trust=seal and access=direct.

C2 · Cora: Seal received. Ledger open. Read here. I’ll count the shelves.

After D3: Set access=none and end the conversation without viewing the ledger. This route has no additional spoken response.

Both successful routes permit viewing. Their difference is accompaniment: Cora stays for D1, while D2 permits reading without her accompanying the player. Neither route permits taking the ledger away.

Map each choice to its result

A route table lets you check the promise before implementation. Keep the displayed wording identical to the dialogue draft, and distinguish visibility conditions from actions that happen after selection.

The Night Archivist: routes following opening cue D0/C0
Route Shown when Player line before selection Result after selection
D1 Always Check my badge. Stay while I read. Cora checks the badge in-scene; then trust=verified, access=supervised; response C1.
D2 has_seal=true Take this courier seal. Let me read on my own. The player hands Cora the seal; trust=seal, access=direct; response C2.
D3 Always I’ll leave without viewing the ledger. access=none; exit without viewing or an additional response.

Notice that possessing a seal does not force the seal route. The player can still choose the badge check or leave. Likewise, the badge route does not require trust=verified beforehand; verification is its result.

To prevent choice labels from overpromising, compare each label with its result and ask: does the selected action happen, and does the response confirm the arrangement? Change whichever side breaks that agreement.

Test the dialogue as a player

Read the choices aloud before reading their responses. Decide what each choice leads you to expect, then compare that expectation with the route table. Use this checklist to test the scene:

  • Seal absent: With has_seal=false, show D1 and D3. Hide D2. Confirm that D1 still permits supervised viewing.
  • Seal present: With has_seal=true, show all three choices. Confirm that D2 produces trust=seal, access=direct, and C2.
  • Badge check: Confirm that D1 shows Cora checking the badge before setting trust=verified and access=supervised.
  • Response variant: Choose D1 while the seal is present. It must still produce C1 and supervised access. The selected route determines the response.
  • Exit: Choose D3 with the seal present and absent. Both cases must set access=none and end without viewing.
  • Voice: Read C0, C1, and C2 together. Check that Cora’s shorthand remains recognizable and that each response acknowledges its route.
  • Presentation: Test controller navigation and text wrapping in the intended interface. Make sure the complete choice remains readable, especially phrases such as “on my own” that define its promise.

Carry the scene into an engine

If you want to place these choices in an engine, this scene is a manageable starting point for a small Ren’Py visual novel. Carry over the stable IDs, visibility condition, state assignments, and response mapping so you can compare the implementation with the script.

For another scripting reference, inkle’s Writing with ink demonstrates choices, gathers that rejoin branches, diverts that jump to labeled passages, and variables that hold state. Those examples establish mechanics available in ink. Use the concepts where helpful without assuming every engine implements them the same way.

Editable dialogue cues

Save the following contents as dialogue-cues.csv to edit the lines and route cues together. Conditions apply to choice rows. Blank state cells mean no assignment; response rows use the state established by their selected route. D0 uses C0 as its opening cue.

id,kind,speaker,text,condition,action_before_response,trust_after,access_after,response_id C0,opening,Cora,"Lockup next. Ledger stays here.",,,,, D1,choice,Player,"Check my badge. Stay while I read.",always,"Cora checks the badge in-scene",verified,supervised,C1 C1,response,Cora,"Badge checked. Ledger open. I stay.",,,,, D2,choice,Player,"Take this courier seal. Let me read on my own.",has_seal=true,"Player hands Cora the courier seal",seal,direct,C2 C2,response,Cora,"Seal received. Ledger open. Read here. I'll count the shelves.",,,,, D3,choice,Player,"I'll leave without viewing the ledger.",always,"Exit without viewing",,none,