2
\$\begingroup\$

How could I add logical branching conversation dialogue in C# with XNA? What I mean by this is a dialogue tree similar to this:

If the user is wearing red:
     DisplayText "You're wearing a red shirt!"
Else:
     DisplayText "You're not wearing a red shirt!"

The key is that I can't hard-code these logic questions into C# itself; it has to be readable from some sort of external file and still executable.

My question is very similar to this question: How can I implement dialog trees into my game?

But my focus is more on how I can actually begin to implement this feature into my game.

\$\endgroup\$
4
  • 3
    \$\begingroup\$ this question has nothing to do with XNA (unless you need help in drawing text on the screen) \$\endgroup\$ Commented Mar 28, 2013 at 21:05
  • 1
    \$\begingroup\$ I recommend that you take a look here: valvesoftware.com/publications/2012/… \$\endgroup\$
    – user15805
    Commented Mar 29, 2013 at 0:33
  • \$\begingroup\$ I'm asking this question in the context of XNA because a particular scripting language (for implementing the dialog tree) might be best for this particular framework. \$\endgroup\$
    – wasshiwa
    Commented Mar 29, 2013 at 3:13
  • 1
    \$\begingroup\$ I voted to close because that other question DOES provide all the needed information. The highest answer suggests XML, which is a viable data source in XNA. The only remaining different part of this question are the implementation details. \$\endgroup\$ Commented Dec 23, 2013 at 0:01

0

Browse other questions tagged .