Read Chris Crawford on Interactive Storytelling Online
Authors: Chris Crawford
But what if you require the Actor to react with multiple actions?
In this case, you can break up the reaction into a sequence of multiple actions. If Joe punches Fred and Fred’s girlfriend, Anne, wants to react by screaming at Joe and then approaching Joe’s girlfriend to request her intervention, you organize Anne’s reaction as a two-step process:
RequestIntervention
, the second action in the sequence.By the way, this notion of having a role for the Subject of an Event is counterintuitive but handy. Why should Subjects react to their own actions? We tend to think of reactions as something done in response to somebody
else’s
actions, not our own. Subject reactions are useful, however; they permit sequential events and multiple behaviors. For example, if Fred shoots and kills Joe, you could have lots of reactions to that one Event. Joe clutches his chest and falls to the ground; Joe’s girlfriend screams and kneels over his body, sobbing. A witness runs to fetch the sheriff. Fred turns and runs. These are all reactions to a single Event, and with roles they are easy to organize. This complicated sequence of events is diagrammed in
Figure 16.1
.
What if one Actor’s reaction obviates another Actor’s reaction?
Yes, this is another little gotcha. If Fred punches Joe and Joe’s buddy Clem steps in and intervenes, you can’t have Joe return the punch; Clem’s intervention makes retaliation inappropriate. Two mechanisms solve this problem: reaction sequencing and hijacking.
Here’s how
reaction sequencing
works: The storytelling engine examines every Actor to determine what roles, if any, that Actor fits, but the engine can examine them in an order best suited to your dramatic purposes. My engine gives Fate first crack at every Event; if Fred shoots Joe and Fate requires that Joe can’t die yet, then Joe falls to the ground, lies there a moment, and then opens his eyes and says, “Garsh, it was only a flesh wound.” That’s Fate’s work.
After Fate has had a pass at the Event, the witnesses come next. They consist of anybody who’s on Stage with the Subject and DirObject but is neither of these two. At this point, witnesses have a chance to intervene. Next comes DirObject’s reaction, and last is the Subject’s reaction.
FIGURE
16.1
: How an Actor goes about reacting to an Event.
The storybuilder, in creating a role, must specify whether any of its Verb options are
hijacking
. If so, then any Actor who chooses that Verb
hijacks the storyline
. Hijacking prevents any other Actors from subsequently reacting to the Event, as diagrammed in
Figure 16.2
.
Try walking through an example using
Figure 16.2
. Start with an Event:Fred Punches Joe
. First, Fate reacts to the Event. Say that Fate finds no role to play, so it takes no action. Next, the witnesses react. One of the witnesses is Joe’s big brother, who finds a role to play and ends up choosing the VerbIntervene
. This Verb has itshijacking
flag set toTrue
, so Joe’s big brother hijacks the storyline, taking you all the way down to the bottom of
Figure 16.2
, “Done.”
The simplest structure for a storytelling engine uses
immediate execution
of Verbs; as soon as an Actor decides on a Verb, he or she executes it. There’s no delay between intention and execution. An engine like this is easy to build.
However, there are all manner of dramatic situations that immediate-execution systems can’t handle. The first problem is
deferred execution
, in which an Actor chooses a reaction that shouldn’t take place immediately. For example, big tough Fred punches wimpy Joe, and Joe, knowing he can’t fight Fred, decides to wreak revenge by painting Fred’s house pink while Fred’s away. Joe doesn’t want to execute his plan immediately; he wants to wait for the proper moment. Besides, he needs time to gather his paint and brushes.
Solving this problem vastly complicates the storytelling engine. It won’t do to simply specify an execution time at some point in the future; what if Joe shows up, paint bucket in hand, while Fred’s mowing his lawn?
FIGURE
16.2
: Reaction sequencing and hijacking.
No, deferred execution requires a more complex approach. First, every time an Actor decides on a reaction, that reaction is entered into the
plan list
, which is just a temporary holding pen for plans that are still cooking. When a plan enters the plan list, it’s given a
preparation time
, the amount of time delay required before the plan can even be considered for execution. Most plans have preparation times equal to zero, ensuring that they’re carried out immediately. The plan sits in the plan list until its preparation time has expired—but it’s still not ready for execution! One more hurdle must be surmounted.
When the plan comes out of the plan list, the situation at that moment might not be conducive to carrying out the plan. (Fred might be mowing his lawn, for example.) So the plan moves from the plan list to the
opportunity list
, which is a holding pen for plans whose audience requirements haven’t been met. Every Verb has certain requirements for the presence or absence of other Actors, called
audience requirements
. For example, romantic Verbs often require the privacy of Subject and DirObject and, therefore, the absence of other Actors.
Refer back to
Chapter 13
, “Verbs and Events,” for more discussion on audience requirements and variables.
Every Actor has an opportunity list of plans waiting for execution; every time the Actor changes Stages, or another person enters or leaves the Actor’s current stage, the Actor consults his opportunity list to determine whether the situation is ripe for carrying out one of the plans waiting in the opportunity list. If so, the Actor proceeds to execute that plan.
Doesn’t this mean that some plans sit rotting in the opportunity list for a long time? What if the right conditions are never satisfied?
This is certainly a possibility. If Dick wants to get Jane alone to romance her, he might never get his chance, but one small trick greatly improves Dick’s chances. Dick doesn’t wait passively for Jane to walk into his Stage when he’s alone; he monitors Jane’s location and, as soon as Jane is alone, he goes to her Stage so that he can carry out his plan.
That’s not realistic! How can Dick possibly know that Jane is alone?
Remember what I said about dramatic reality versus physical reality? This is storytelling—you don’t allow yourself to be distracted by accounting details. You want Dick and Jane alone together, so you grab the first opportunity you can.
But what if Jane is alone because she’s taking a shower? Dick can’t just barge in!