12 · Dynamic Character Creation | Generative AI for Game Development
This chapter companion explains how to build game characters that adapt, remember and evolve with player choices. It separates stable traits from shifting emotions and shows how AI can add depth without losing authorial control.
Static dialogue trees tend to make game characters feel like cardboard cutouts, repeating the same lines on every playthrough. This video, a companion to chapter 12 of Generative AI for Game Development by Shesh Narayan Gupta, shows how to build characters that adapt, remember and sometimes surprise the player. Its central idea is that traits anchor a character, emotions shift, and AI helps scale the result.
Static characters versus dynamic ones
The video defines three terms. A dynamic character adapts, remembers and evolves with the player's choices. An emotional state is a moment-to-moment variable, such as trust, anger or fear, that changes during interaction. A trait is the enduring core, such as loyal or skeptical, that keeps the character recognizable.
A static character picks from a fixed tree, so the lines become mechanical. A dynamic character remembers how the player treated them, reacts to tone and changes its opinion over time. The video puts it as the difference between a puzzle piece and a relationship.
Why dynamic characters matter
Dynamic characters build emotional investment, because the player is tending a relationship that can deepen or fracture rather than choosing the right option. They also add replay value, since a different tone can reshape a personality and its fate. The video points to Red Dead Redemption 2, where relationships in camp accumulate through small repeated gestures, and The Witcher 3, where Yennefer and Triss respond to Geralt with warmth, sarcasm or guardedness depending on shared history.
An example character named Lena starts with high caution and low trust. If the player consistently protects her and avoids risky choices, her trust rises and her dialogue warms.
Three building blocks
The video names three building blocks: personality traits tracked as variables that evolve, AI-written backstories that motivate and differentiate characters, and behavior and mood systems that layer emotional states over traits and carry memory across scenes. As an example, the same wandering healer can have a very different past in different playthroughs, such as abandoning a royal family to pursue peace or fleeing a crime syndicate, and still be a distinct person each time.
How AI expands character depth
AI adds depth in four ways:
- Procedural backstories, with multiple life paths per character.
- Personality-driven dialogue, with lines matched to mood.
- Traits on demand, such as small quirks like a nervous character adjusting their gloves.
- Scale, meaning many variations without handwriting every line.
The video stresses that AI is a creative partner, not a replacement. Raw output can clash with the game's tone, so the writer should select, refine and sometimes rewrite. A disappointed, loyal character can say something fresh each time instead of reusing one line.
A three-layer architecture
The design has three layers. Personality traits sit at the base, emotional states that evolve over time sit in the middle, and the behaviors, dialogue and choices the player sees sit on top. Dragon Age: Origins and Firewatch are cited as examples of stable traits with shifting emotions. In code, this becomes a base trait system plus emotional modifiers: a loyal character named Soren speaks one way when trust is above 70 and another when it falls below 40. Strong emotion also lives in subtext. Rather than "I am angry with you," a line such as "Is that what you really think of me?" lets players read between the lines.
The hands-on Flask project
The project is a Flask character generator. A form takes a name and traits, an AI model writes a backstory, and two buttons simulate events. For the example Captain Io, support raises trust by 20 and lowers anger by 10, while betray lowers trust by 20 and raises anger by 30. Each click updates the emotional state and the dialogue follows.
Ethics to hold
The video lists four: avoid emotional manipulation such as guilt-tripping players for engagement, be transparent, curate AI output for cultural sensitivity, and keep narrative coherence by grounding adaptation in strong core traits.
Key takeaways
- A dynamic character adapts, remembers and evolves; a static one repeats a fixed tree.
- Traits are the stable core; emotional states are variables that shift with interaction.
- Three building blocks are evolving trait variables, AI-written backstories and mood systems.
- AI adds backstories, mood-matched dialogue, quirks and scale, but its output must be curated.
- Layer traits, then emotions, then visible behavior.
- Write emotion through subtext instead of naming it.
- Avoid manipulation, stay transparent and check generated output for stereotypes.
Try it yourself
Pick one NPC in your game and give them one trait and one secret. Then ask what would make them evolve and what would change their mind about the player. Design that moment, and you have started building a dynamic character. The book and its accompanying code are listed in the video description if you want to follow the Flask project.
Full transcript(auto-generated, with timestamps)
[0:00]Chapter 12, dynamic character creation. The big idea, characters are the heart of every memorable game and static dialogue trees make them feel like cardboard cutouts. Today, personalities that adapt, remember, and sometimes surprise us. Three terms, a dynamic character adapts, remembers, and evolves with your choices. An emotional state is a moment-to-moment variable, trust, anger, fear, that shifts as you interact. And a trait is the enduring core, loyal, skeptical, the part that anchors them. Here's the shift, a static character picks from a fixed tree, same lines every play through until they feel mechanical. A dynamic character remembers how you treated them, reacts to your tone, and evolves their opinion over time. One is
[0:41]A puzzle piece, the other is a relationship. Why does this matter? Because dynamic characters build emotional investment. You're not selecting the right option, you're tending a relationship that can deepen or fracture. They boost replay value, a different tone reshapes personality and fate, and they make a promise, your actions matter here, not just your choices, but your approach, your attitude, your emotional presence. Red Dead Redemption 2 shows this beautifully. Arthur Morgan's relationships with the camp don't just run on story missions, they accumulate through small repeated gestures, a greeting, a shared drink, a moment of support, micro interactions building macro emotional arcs. The Witcher 3 does it, too. Yennefer and Triss answer
[1:21]Geralt with warmth, sarcasm, or guardedness, and which one you get depends on shared history and the paths you've chosen. Same characters, different relationships because the game remembers. Meet Lena, she starts with high caution and low trust. She keeps the player at a distance and won't share her real motivations, but if you consistently protect her and avoid risky choices, her trust climbs, her dialogue warms, she grows more adventurous, shaped by your influence, trait by trait. Three building blocks make this work, personality traits tracked as variables that evolve, backstory generation, AI written histories that motivate and differentiate, and behavior and mood systems, emotional states layered over traits, so every interaction feels alive
[2:02]And carries memory across scenes. Take Amina, a wandering healer with a secret past. One playthrough, she abandoned a royal family to pursue peace. Another, she's fleeing a crime syndicate after betraying her allies. Same role, entirely different person because the backstory changed. Now the dialogue, Elise deeply loyal but right now disappointed in you. A static game reuses one disappointed line. With AI, you get nuance. I thought you understood me better than that or maybe I was wrong to trust you so easily. Same emotion, fresh every time, deepening the realism. AI expands character depth in four ways. Procedural backstories, multiple life paths per character, personality-driven dialogue, lines matched to mood and
[2:43]Traits on demand, quirks and habits, the small memorable touches like a nervous NPC adjusting their gloves, and scale, limitless variations without handwriting every line. But there's a rule, AI is a creative partner, not a replacement. Raw outputs can clash with your game's tone, so select, refine, and occasionally rewrite. Curate everything, so every generated line serves the story. Here's the architecture, three layers. At the base, personality traits, who the character fundamentally is. In the middle, emotional states that evolve over time. At the top, the behaviors, dialogue, and choices the player actually sees. Arrows flow upward, stable at the core, capable of change at the surface. Dragon Age: Origins nails this. Morrigan
[3:25]Stays sharp and guarded, that's her core, but as approval rises, her sarcasm softens into teasing warmth. In Firewatch, Delilah is playful by default, yet drifts toward warmth or guilt depending on Henry's openness. Stable traits, shifting emotions. In code, it's a base trait system plus emotional modifiers. Soren is loyal. If trust is above 70, he says, "I've stood by you this far. I won't turn back now." If trust drops below 40, the same loyal Soren says, "I thought my loyalty meant something to you. Perhaps I was wrong. Same trait, different heart." And the writing matters as much as the system. Strong emotion lives in subtext, never
[4:00]"I am angry with you." Instead, "Is that what you really think of me?" or "You keep proving my doubts right." Frustration and vulnerability unnamed, and players read between the lines. Time to build. The hands-on project is a Flask app, a character generator. Create characters with traits, generate backstories with an AI model, then simulate emotional events, and watch trust and anger evolve in real time. We'll build Captain Io's character. Two buttons: support, trust climbs 20, anger drops 10. Betray, trust falls 20, anger spikes 30. Every click updates the emotional state, and the characters' responses follow. You're not just reading a profile, you're shaping a relationship. Captain Io generated. The
[4:40]Form gives you a name and traits, loyal, skeptical, your starting personality. The AI writes a unique backstory from those traits, and the buttons let you support or betray. Trust and anger shift, and the dialogue follows. With this power comes responsibility. Four ethics to hold. Emotional manipulation, guilt-tripping players for engagement or purchases crosses the line. Transparency, players should sense reactions are shaped without breaking immersion. Cultural sensitivity, curate AI output, never ship unchecked stereotypes. And narrative coherence, ground adaptation in strong core traits or the story fragments. Remember, characters are not disposable tools. They're emotional touchstones. A well-designed dynamic character is a co-creator in the story journey, so
[5:22]Design with empathy, integrity, and genuine respect for the player's investment. The takeaway: traits anchor, emotions shift, AI scales. Dynamic characters aren't just a technical upgrade, they're a shift in how we think about storytelling. The goal isn't to simulate life, it's to deepen the player's emotional journey. Your turn. Pick one NPC in your game. Give them one trait and one secret. Then ask, "What would make them evolve? What would change their mind about the player. Design that moment and you've started building a dynamic character. That's chapter 12 next, integrating AI models into your game development pipeline. If this helped, subscribe and I'll see you in video 13.
More from Generative AI for Game Development — Shesh Narayan Gupta
3:5313 · Integrating AI Models into Game Development | Generative AI for Game Development
4:3311 · Emotionally Adaptive Storytelling | Generative AI for Game Development
5:0114 · Procedural Worldbuilding with AI | Generative AI for Game Development
4:4110 · Designing Emotionally Engaging Narratives with AI | Generative AI for Game Development
4:3115 · Advanced Applications in C# and Unity | Generative AI for Game Development
4:06