.net - What's the proper approach for writing multi-path "story" flows? -


I wonder if you can help me.

I am writing a game (2D) which for players to take several routes, some of which branch / merge - probably even loop too.

I am telling each section an ishorailement - and I am thinking that the way in which these elements are easily converged / configured to link better than that. Also, graphical

I'm going to be an engine / factory assembly that will load the appropriate StoryElement on the basis of various configurable options.

I start with each storyElement a as the next element () Istora Element property and a complete () event Had planned to deliver. When the vent is fire, the engine reads the NextElement property to find the next storyElement .

The downside is that if I ever want to graph all the routes through the game, I am unable to do this - I would like to do everything for every StoryElement Could not set goals.

I have considered some other solutions but they all feel a bit - as if I need an additional layer of intangible? I.e. StoryElementPlayers or similar - each will be responsible for multiple simultaneous storyElement string, perhaps a series and a ChoicePlayer will be responsible for the graphing of their own storyElement - but this Only one layer problem

In short, I need a few simple ways to copy a simple but dynamic workflow (but I really did not want to use WWF). Is there a pattern for this simple thing? All the people who have managed to find me related to more advanced control flow (parallel processing, etc.)

It can help to think about the storyElement objects in the guided article as nodes, displayed by the edges of the graph by StoryElementTransition objects (or some similar names) can be done. A StoryElementTransition may include references to that state, from which you want to transit, in which case you want to transit, and possibly an event that triggers the infection.

In the form of a graph, you open the possibility of running a guided graph traversal algorithm to determine all possible routes through the game. For example, you can run a search algorithm deeper on the event graph, transfer each state to the stack, and once the stack can enter the whole state.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -