Peisme.com

Semaine 19 - Conversation dynamique

[...] a system we [Valve] have for tracking a whole bunch of state about the world in a uniformly manageable way, then using that state to select just the right line from a big database of character speech.[...]

You can't have dialog without writers, and making writers' live easy is the best way to get good dialog.

The problem of Contextual Dialog (ie. dialog that responds to player actions and world state) : In the begining this was simple but it quickly got complicated. Some games used trees to create choice, and stored explicit flags but that gets unwieldy pretty fast.

[...]

First we asked, "what's the easiest, simplest way we can prototype making characters aware of their environment ?" [...] each robot simply polls its field of vision every few seconds. If it finds an object there, it tries to find a line in its database corresponding to the object’s tag. If there’s a match, it plays.

[...]

Walking around reading signs is all well and good, but we wanted characters to talk to each other. [...] So once again, we asked, what’s the simplest possible way we can do this? And we figured that the same way we had the robot poll its vision every few seconds, and send itself a “onSee” event with the name of the object if something were there; we could have each line of dialog by the red robot dispatch an “onReply” event to the blue robot when it was finished. [...] If the second robot has a reply, it plays; possibly it triggers a reply on the first robot, and back and forth.

[...]

We wanted companion characters that had memory; that reacted differntly based on what the player had done near and to them before. Again, what was the simplest, easiest way we could do this? We figured we could add just one more little bit of technology. The same way all the previous rules were parameterized by *eg* the object seen, along with other criteria; we figured we could create a table of “memory” in the character’s head and then send that along with every voice query it made.

Ici, nous avons 3 personnages : Anne, Bernard et Claude.

Ils peuvent tous dire une fois « Bonjour ! » ou « Je n'ai plus rien à dire. » autant de fois qu'ils le désirent. Ils ont aussi une phrase de présentation et certains ont des réponses aux énoncés des autres.

Voici la liste des règles utilisées :

Chaque fois qu'ils doivent parler, les personnages consultent leur mémoire pour choisir une réponse contextuellement valide.

Grâce à des règles pouvant aller de très simples à très compliquées, et d'une connaissance du contexte entourant chaque personnage, ces derniers peuvent donner l'impression d'une grande intelligence.

Remarquez qu'un personnage ne répète jamais « Bonjour ! » et ne se présente qu'une seule fois. Bernard ne donne son nom qu'après une longue attente et il devient impatient si quelqu'un annonce qu'il n'a rien à dire.