Game Development Reference
In-Depth Information
evolve in parallel with others. Such an algorithm is good for phrases that are not con-
nected together; with these algorithms, a player may talk about one thing and then
switch to questions about another without the fear of losing some phrases, as if he
would use an interface based on tabs. For other cases, sometimes a radio button
should be utilized. This means that only one protagonist's phrase can be used at
a moment; other branches are cut. Suppose that a suspicious NPC asks a player
about his name, there is an option in the conversation tree to tell either the true or
false name; both the variants are radio-buttoned nodes since they cancel each other
out. When one option is chosen, the other one must disappear. In addition, there can
also be hybrids of both types of transitions. As you see, the framework of conversa-
tion can be very complex and tangled, making the interaction with virtual character
very enthralling.
It is good practice to introduce two possible ways to reach the end of the branch or
the conversation at all: the long one for curious players and the short one for fid-
gets. Those who hurry to continue with adventures and don't like dialogues have the
opportunity to choose only key phrases, but other ones may need more detailed de-
scriptions.
Besides the normal conversation, sometimes in the game you may use a so-called
lunatic talk, a dialogue based on accident and chaos. It is some sort of slot ma-
chine. It is activated by starting a conversation with a special NPC. In most cases the
phrases are meaningless and empty, but sometimes something very valuable can
be attained. As a rule, such mechanics are utilized for special class of NPCs that
can be referred as holy fools, for example, strange and weirdo hobos, old sages,
broken robots, and so on. Their speech mostly consists of absurdity and nonsense
but sometimes real revelations can be heard; the player only needs some good luck.
Technically, the conversation tree can be designed by a series of conditional state-
ments and string variables storing texts. This is the simplest and obvious way, but it
is not perfect but a little bit cumbersome. In this case each dialogue is custom made
by code. The system is not flexible, especially for localization purposes, as it is much
more difficult to prepare texts for different languages. It is much more effective to use
external arrays of phrases and one universal function for parsing that data. In this
case, a special standalone dialogue editor can be created (as many game studios
do) that saves conversations in special files. The only problem is that of data format
because a tree is not a trivial data structure. You can invent your own format based
onoriginaltagsorreinterpretsomethingthatwasdesignedspeciallyforgraphs:DOT
(graph description language), GraphML, Trivial Graph Format, and many others.
Search WWH ::




Custom Search