Skip to main content
April 24, 2012
Question

Dialogue choices

  • April 24, 2012
  • 1 reply
  • 516 views

I'm working on a book where the user can select various dialogue choices. These lead to different dialogue that are displayed on the screen.

Structure:

I'm planning only to include 2 choices whenever choices pop up to keep things simple, and all choices eventually merge together into the same path in the same number of steps (for example if choosing choice 1 leads to 3 more unique dialogue, then choosing choice 2 also leads to 3 more). These choices never intersect and never have another set of choices until the paths are merged, also to keep it simple.

This is what I mean by intersecting, which is not what I'm doing (thought I'd like to include this in future projects):

Paths that cross each other and open up more choices, etc.

All my dialogue paths will be completely linear and parallel.

I'm having serious trouble doing this just in AS/Flash with arrays, and I get lost very easily because my script is obviously much longer and complex than the example I drew.

Is there a tutorial on how to do this kind of dialogue choices, maybe with XML or something?

Thanks.

This topic has been closed for replies.

1 reply

_spoboyle
Inspiring
April 24, 2012

what you're looking at is a Tree and I don't think xml is going to be a good way to represent the data.

Whatever way you choose to represent the data you need to parse it into a tree like structure perhaps using your own implementation of a singly Linked List. (i.e. each node will know its children but a child will not know its parent)

then for each Dialogue (or node) in your tree you can get the available children