7.6. Getting Started with Conversation

| Chapter 7: Other Characters |

| 7.6. Getting Started with Conversation

Traditionally, conversation is one of the most difficult things to program in interactive fiction, because of the number of factors affecting the outcome of everything the player does. While it's acceptable for >EXAMINE POT to produce the same response every time the player types it, it's a bit less acceptable for ASK JOE ABOUT HIS ADULTERY to make Joe react the same way every time.

Conversation implementations often need to keep track of a lot of information: what else is going on in the model world, what the character knows, what plot phase we've reached, what mood the character is in, what else we've recently been talking about, whether we've said the same thing before (and how many times); and so on. Later in this chapter we will look at ways to model character knowledge and mood.

Then, too, we have the problem of how the player communicates his conversational intentions to the game. Technology has not yet advanced to the point where a player can simply type in remarks in full natural English and have the character detect the significance, emotional tone, and subtext, if any: so we can't have RACHEL, THIS DESSERT TASTES LIKE FEET or WILL, LOOK! OUR SINISTER METAL FOES ARE APPROACHING! or BOSS, I WOULD BE DELIGHTED TO FILE ANOTHER TPB REPORT.

The challenge is to create an interface that is both easy for the player to use and expressive enough to be interesting. We will look at some of the common solutions in "Saying Complicated Things".

The examples in the following sections point out ways to approach common conversation problems. None of them will offer an adequate system if we want to write a very conversationally rich game, however. This is partly because a thorough conversation system requires quite a lot of code in its own right. It's also partly because there is no one right solution to the problem of conversation design. Different games will have quite different requirements. When making decisions about a new game we have planned, it may be useful to glance through the conversation extensions available for Inform: there are quite a few, offering a range of different interfaces. Even if none is exactly suited for our needs, they may suggest ways to solve particular implementation challenges.

At the other end of the scale, though, there are times when Inform's default implementation is too complicated for what we want to do: so we will start with ways to simplify conversation, before moving to all the exotic complexities.

Before we get into these details, though, we have a couple of examples that are literally about getting started with a conversation: Mimicry introduces the feature that we must greet other characters before beginning to speak to them; The Gorge at George corrects the player's attempts to use a TALK TO command where a different mode of interaction is appropriate instead.

110
| Example Mimicry People who must be greeted before conversation can begin. |
WI

316
| Example The Gorge at George If the player tries to TALK TO a character, suggest alternative modes of conversation. |
WI

"Gorge at George" The Dusty Lot is a room. "A few miles up the road from the concert venue, but at least it's cheap to park here." The motorcyclist is a man in the Dusty Lot. "A man clad in [a list of things worn by the motorcyclist] leans against his Harley and watches you without saying anything." The Harley is scenery in the Lot. The motorcyclist wears a black leather jacket and shades. Understand "man" or "guy" as the motorcyclist. Understand "talk to [someone]" as a mistake ("To start a conversation, try to ASK [the noun] ABOUT something or TELL [the noun] ABOUT something."). Instead of asking the motorcyclist about something: say "He smirks cryptically." Instead of telling the motorcyclist about something: say "This does not seem to interest him much." Test me with "talk to motorcyclist / ask motorcyclist about himself / tell motorcyclist about me".

Previous | Contents | Next