Game Development Reference
In-Depth Information
Getting the NPC's talking
So far in this chapter, we have our populated town with characters, buildings, and so on.
Therefore, let's give our hero something to talk about.
While building a conversation system for any game, there are many factors to consider,
which are as follows:
• How long a conversation is going to be (we don't want the player to get bored
with miles of text)?
• How many parties are likely to be involved in any discussion?
• Is this a flat one-sided conversation (such as a cutscene) or will the player be al-
lowed to make decisions?
• Are there going to be branches in the conversation so that the conversation will
change based on the player's response?
• How much content do you expect to be used in conversations (only text, video,
cutscenes, animation, and so on)? All of this content will decide just how extens-
ible your system needs to be.
• Will the conversation need to support any outbound triggers or states? Will the
conclusion of a conversation unlock a door or grant the player with some experi-
ence or items?
There are lots of other factors that will affect both the design and implementation of a ro-
bust conversation for your game, so think about it carefully before touching the code.
Note
A working example
For this topic, we are going to build a basic conversation system that is enough to meet
the goals of the project at hand. However, I am explaining each part along the way, so if
you want to expand on it, you can.
The conversation object
When we want to start talking in the game, we first need to decide what you want to in-
clude in that conversation. You can include the following things:
• The name of the character who is speaking
• The text of the conversation
• An image of the character talking
Search WWH ::




Custom Search