Chapter 21 — Exercises
These exercises move from writing craft to system implementation. Allocate 2-4 hours per exercise. Do them roughly in order — the later ones assume you have completed the earlier ones.
Exercise 21.1 — Audition Three Voices
Type: Writing Time: 60-90 minutes
Pick three characters from games you have played. Copy three lines of dialogue from each character onto a single page — nine lines total. Remove the character names. Ask a friend or fellow designer to guess which lines belong to which character based only on voice.
Now do the reverse. Invent three characters for your own game: a gruff mercenary, a cheerful child, a skeptical scientist. Write three lines each — any three lines — and give them to a friend to match. Can they tell which line belongs to which character?
Questions: - What made the professional lines recognizable? Vocabulary? Sentence length? Verbal tics? - What did your own lines need to make them recognizable? Where did you succeed? Where did you fail? - Rewrite the weakest three lines, making each character's voice more distinct.
Deliverables: - The nine lines from professional games with your analysis - Your own nine lines (v1) - Your rewritten nine lines (v2) with notes on what you changed
💡 Intuition: Voice is the single most impactful thing you can do for your NPCs. A boring character with strong voice is memorable. An interesting character with weak voice is forgettable. Get voice right before you worry about anything else.
Exercise 21.2 — Cut Your Lines in Half
Type: Writing Time: 45-60 minutes
Write a 300-word conversation between two characters in your game. One is a quest-giver; the other is the player-character. Do not edit as you go. Just write.
Now cut it to 150 words. Not 290. Not 200. Exactly 150.
Now cut it to 75 words.
Questions: - What did you have to lose? What survived? - At which length did the conversation start to feel like game dialogue rather than prose? - Which cuts were painful? Which were liberating?
Deliverables: - 300-word draft - 150-word edit - 75-word edit - A paragraph reflecting on what the exercise taught you about compression
✅ Best Practice: Most first-time game writers overwrite by 2-3x. Running a rigid cut exercise like this one calibrates you to how much you can lose without losing the scene. You will rarely ship the 75-word version — but every final line will be better for having been compressed that far first.
Exercise 21.3 — Diagram a Branching Tree
Type: Analysis Time: 2-3 hours
Play a conversation in an RPG of your choice — Mass Effect, Disco Elysium, Baldur's Gate 3, Fallout: New Vegas, or Planescape: Torment. Pick a single conversation that has multiple branches. Replay it three or four times, making different choices each run.
Draw a diagram of the complete branch structure. Use boxes for NPC lines, diamonds for player choices, arrows for transitions. Mark which branches lead to different outcomes (quest accepted vs. declined, information revealed vs. withheld, relationship changed vs. unchanged).
Questions: - How deep was the tree before branches converged? - How many meaningful endings were there? How many dead-end branches merely colored the experience? - Which branches existed purely for flavor, and which carried mechanical weight (flags, rewards, consequences)? - If you were implementing this in Godot using the DialogueSystem from this chapter, how would the data dictionary look?
Deliverables: - The hand-drawn branching diagram (photograph or scan acceptable) - A one-page written analysis addressing the four questions - A partial data dictionary in GDScript showing at least 10 nodes of the conversation
Exercise 21.4 — Implement the Base Dialogue System
Type: Implementation Time: 3-4 hours
Implement DialogueSystem.gd and DialogueUI.gd exactly as they appear in this chapter. Create the autoload singleton. Build the DialogueUI.tscn scene. Attach the Elder Mira sample conversation to an NPC in your project and test.
Deliverable is a working in-game conversation. The player should be able to walk up to an NPC, trigger the conversation, read lines with a typewriter effect, select choices, and advance through the branches.
Test cases:
- Normal forward progression works
- Choice buttons are hidden until the line finishes typing
- Pressing Accept skips the typewriter
- The wolf_quest_accepted flag is set when the player accepts the quest
- Choosing "Never mind" ends the dialogue cleanly
Deliverables: - Working code committed to your project - Short video (or animated GIF) of a complete playthrough of the Elder Mira conversation - One paragraph describing any bugs you hit and how you resolved them
Exercise 21.5 — Author Your Own Conversation
Type: Writing + Implementation Time: 2-3 hours
Using the dialogue system from Exercise 21.4, author a conversation for an NPC specific to your game. The conversation must:
- Have at least 6 nodes (not counting the end-of-conversation state)
- Have at least two branching paths from the root node
- Include at least one choice that sets a game flag
- Include at least one choice that requires a game flag to appear
- Serve both narrative and gameplay functions (the player learns something about the world AND something actionable about gameplay)
Write the conversation data as a GDScript dictionary. Implement and test.
Deliverables: - The conversation data dictionary (code) - A working in-game implementation - A brief writeup (1 page) describing what character this NPC is, what role they play in your game's narrative, and how their dialogue serves the player's experience
🎮 Play This: Before writing your own NPC, play Disco Elysium's opening 30 minutes. Notice how every character you meet in the hostel is fully inhabited — verbal tic, worldview, relationship to the detective, motive in the scene. Aim for that level of specificity in your NPC, even if your scene is 1/10 the length.
Exercise 21.6 — Analyze Character Writing
Type: Analysis Time: 90 minutes
Choose a game with a strong companion character: The Last of Us (Ellie), Mass Effect 2/3 (any Normandy squadmate), Hades (any of the gods), Red Dead Redemption 2 (Arthur or any camp member), Disco Elysium (Kim Kitsuragi), or similar.
Watch or replay 30-60 minutes of the game, specifically attending to that character. Take notes on:
- What is their verbal tic? Write 3 example lines that display it.
- What is their arc in this window? Do they change?
- How does the player-character (or player choices) affect them?
- What gameplay function do they serve alongside their narrative function?
- What would you cut if you had to reduce their dialogue by 30%?
- What would you add if you had 30% more budget?
Deliverables: - Two pages of notes addressing the six prompts - Three example lines demonstrating verbal tic - A short critical paragraph: in your view, what is this character's single best design decision, and what is their weakest?
Exercise 21.7 — Design a Companion
Type: Design Time: 2-3 hours
Design a companion character for your own game. Before writing any dialogue, write a character sheet answering:
- Name and one-sentence concept
- Age, background, how they came to travel with the player
- What they want (their own goal, distinct from the player's)
- What they fear
- Their verbal tic (give three example phrasings)
- Their relationship arc across the game (how does it change?)
- One gameplay function they serve (combat partner? puzzle-solver? information-source?)
- One line of dialogue for each of the following situations: entering a new area, after a combat victory, after the player fails something, responding to a moral choice you let the player make, a quiet evening-around-the-campfire reflection
Deliverables: - Complete character sheet (2-3 pages) - The eight sample lines - A short reflection: which of the four archetypes in this chapter (narrative mirror, gameplay partner, relationship anchor, voice for the voiceless) best describes their role?
Exercise 21.8 — Add Reactivity to an NPC
Type: Implementation Time: 90 minutes
Take the NPC from Exercise 21.5. Extend their conversation to include at least three reactive branches — lines that appear only based on previous events in the game. Examples:
- A greeting that changes based on whether the player has completed the main quest
- A topic that unlocks after the player has visited a specific location
- A line of disappointment that appears if the player made a cruel choice earlier
- A line of gratitude that appears if the player helped another NPC
Use the requires_flag and hides_if_flag mechanisms from the dialogue system. Test all branches by manipulating flags via debug commands.
Deliverables: - The extended conversation data dictionary - A test script or in-game debug panel that can toggle flags - Screenshots or video showing the NPC's dialogue in three different flag-states
🧩 Productive Struggle: Reactive dialogue is where dialogue-as-mechanic starts to crystallize. The first NPC you make reactive will feel magical when it works. You realize the world is now responding to what the player did. This is the gateway to living-world games. Invest the time.
Exercise 21.9 — Write Barks for Your Player-Character
Type: Writing Time: 60 minutes
Your player-character encounters many small game events — taking damage, picking up an item, entering a new area, completing an objective, killing an enemy. Write barks (short one-line contextual utterances) for at least eight of these events.
Constraints: - Each bark is under 8 words - No bark is longer than 1.5 seconds of spoken time - Your character has the verbal tic you established in Exercise 21.1 or Exercise 21.7 - For each event, write 3-5 bark variants (for variety)
Events to cover (pick at least 8): - Taking damage (light) - Taking damage (critical) - Low health warning - Picking up health - Picking up ammunition/resource - Entering a new area - Finding a hidden item - Killing an enemy (normal) - Killing an enemy (headshot / critical) - Ally killed - Objective completed - Objective failed - Running low on stamina/resource
Deliverables: - A bark table (event → variants), minimum 24 lines total - A short paragraph on bark-writing: what did you learn about compression and voice in this short form?
Exercise 21.10 — Localize a Scene
Type: Design + Analysis Time: 90 minutes
Take the conversation you wrote in Exercise 21.5. Prepare it for localization by:
- Creating a translation table (key → English text) extracted from your data dictionary
- Identifying any lines that will not translate well (idioms, wordplay, puns, gendered language, length-sensitive UI)
- Rewriting those lines to be localization-friendly
- Estimating the German and Japanese lengths of your lines (rough heuristic: German = English × 1.35; Japanese = English × 0.55 when measured in screen characters)
- Identifying where your UI will break if you used the German version
Deliverables: - The translation table (English only) - A list of problem lines and their rewrites - A sketch or screenshot showing how the UI needs to accommodate longer translations - A short reflection: what did you learn that will change how you write future dialogue?
📝 Note: Localization is not a post-production task. It is a design discipline that, done well, is invisible — your game ships in 15 languages and nobody complains. Done poorly, it is a cascading series of emergency rewrites six weeks before launch. Build the habits early.
Exercise 21.11 — The Silent Protagonist Experiment
Type: Design Time: 2 hours
Take a conversation from a game with a voiced protagonist. Rewrite it as if the player-character were silent. The player's choices still exist, but the character does not speak — instead, the player makes actions (gestures, movements, or simple binary choices).
For the reverse direction: take a silent-protagonist moment (a scene from Portal or Half-Life 2) and rewrite it with a voiced protagonist. What does the scene gain? What does it lose?
Questions: - Which mode made the scene stronger? Why? - Does the choice of voiced vs. silent affect what the scene can be about? - How did the supporting characters have to change in each direction?
Deliverables: - Both rewrites (side-by-side) - A one-page comparative analysis
Exercise 21.12 — Capstone: Three NPCs Fully Integrated
Type: Implementation Time: 4-6 hours
For the progressive project, implement three NPCs in your game, each serving a different function:
- The Quest-Giver. Offers the current objective. Sets a flag on acceptance. Reacts to completion.
- The Lore NPC. Hub-and-spoke structure. Provides world context. Has at least 4 unlockable topics.
- The Reactive NPC. Dialogue changes based on quest state. Has at least 3 distinct quest-state branches.
All three must: - Use the DialogueSystem from this chapter - Have a clearly defined character voice (verbal tic, worldview) - Serve both narrative and gameplay functions - Respond to the player's position in the game's story
Deliverables: - All three NPCs working in your game - Complete conversation data dictionaries for each - A 2-3 page document describing each character: their voice, their role, their design intent - A short video (or screenshots) showing the three NPCs in action, including at least one reactive-dialogue branch triggered by prior player actions
🪞 Learning Check-In: When you finish this capstone, pause and play your game from the beginning. Listen to how your NPCs sound. Do they have distinct voices? Do their conversations feel like they could have been extracted from a real game? Or do they feel like programmer placeholder text? If the latter, go back and rewrite. The bar for shipped dialogue is not "good for a student project." The bar is "interesting to read." Meet that bar before moving on.
Self-Assessment Checklist
After completing these exercises, you should be able to:
- [ ] Distinguish between branching-tree, hub-and-spoke, keyword-based, and contextual dialogue systems
- [ ] Implement a branching dialogue system from scratch in Godot
- [ ] Write short, voice-distinct dialogue that survives skim-reading
- [ ] Design a companion character with coherent verbal tic and functional role
- [ ] Author reactive dialogue using game flags
- [ ] Write barks that fit in under 8 words and carry character
- [ ] Prepare dialogue for localization
- [ ] Articulate the tradeoffs between silent, voiced, and customizable protagonists
- [ ] Diagnose common failure modes in game dialogue
If any of these remain uncertain, revisit the chapter section that covers them.