O'Reilly logo

Game Engine Architecture, Second Edition, 2nd Edition by Jason Gregory

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

13.6.2.5 Conversations

In The Last of Us, Naughty Dog wanted the enemy NPCs to sound like they’re having real conversations with one another. This meant that the characters would need to be capable of saying relatively long chains of lines, with backand-forth banter between two or more characters.

Conversations in The Last of Us are constructed from logical segments. Each segment corresponds to one logical line, spoken by one particular actor in the conversation. Each segment is given a unique id, and the segments are chained together into a conversation via these ids. As an example, let’s see how we would define the following conversation:

A “Hey, did you find anything?”
B “No, I’ve been looking for an hour and I ain’t found nothin’.”

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required