In article <1172884811.592475.141260@[EMAIL PROTECTED]
>,
Ultrus <owntheweb@[EMAIL PROTECTED]
> wrote:
>In my quest to understand the dreaded RPG better (only because it's
>big), I'm curious about how data or sequence of events is stored/
>tracked in a non-linear storyline. How does the game know that I
>need to get a special blend from the half baked baker, before I
>present a big feast at the annual farm festival?
Off the top of my head, I'd say that there's a big list of quest
scripts, each of which has an internal state machine. (If you don't
recognize that term, go read
http://en.wikipedia.org/wiki/Finite_state_machine
or
http://ai-depot.com/FiniteStateMachines/
). At the start of the game,
all quest scripts are reset to their startup state, and maybe one
script is activated (for a singleplayer game).
The script keeps track of what has happened, and when condition X
is satisfied, it goes into state Y. Talking to someone may set a
script from 'startup' to 'get item X' state. When you have it, it goes
to 'deliver it to Y' state. The game doesn't care what each of the
individual scripts does, as long as they all get notifications so they
can update their state. Multiple scripts can be in various states at
once just fine.
Nathan Mates
--
<*> Nathan Mates - personal webpage http://www.visi.com/~nathan/
# Programmer at Pandemic Studios -- http://www.pandemicstudios.com/
# NOT speaking for Pandemic Studios. "Care not what the neighbors
# think. What are the facts, and to how many decimal places?" -R.A.
Heinlein


|