4. Time and Plot

Recipe Book

RB §4.1 The Passage Of Time

A story that makes heavy use of time may want to give the player a hint that time is important - and an easy way to keep track of how it's going - by adding the current time to the status line, instead of the score. To do this, we would write

When play begins:
   now the right hand status line is "[time of day]".

All else being equal, time passes at a rate of one minute per turn. But this need not be so: we can imagine a story where turns take much less time, or much more; or a story in which the passage of time was sometimes suspended, or one in which different actions required different amounts of time to perform.

Situation Room provides a way to print 24-hour time, while Zqlran Era 8 ★★★ implements a completely new measurement of time, for a story set on an alien world.

Uptempo and The Hang of Thursdays ★★★ speed up time's passage: turns take fifteen minutes in the former, or a quarter day in the latter.

Timeless makes certain actions instant, so that they don't count against the clock; this is sometimes useful in timed situations where the player needs to review the situation before going on with a tricky puzzle. Endurance ★★ systematically extends this idea to allow us to assign different durations to any action in the story. The Big Sainsbury's goes the opposite direction, and meticulously adds a minute to the clock for all implicit take actions, just so that the player isn't allowed to economize on moves.

An alternative approach to time is not to tell the player specifically what hour of the day it is at all, but to move from one general time period to another as it becomes appropriate - when the player has solved enough puzzles, or worked his way through enough of the plot. To this end we might use scenes representing, say, Thursday afternoon and then Thursday evening; then our scene rules, rather than the clock, would determine when Thursday afternoon stopped and Thursday evening began:

Thursday afternoon is a scene. Thursday evening is a scene.
Thursday afternoon ends when the player carries the portfolio.
Thursday evening begins when Thursday afternoon ends.
When Thursday evening begins:
   say "The great clock over St. Margaret's begins to chime 6.";

Though this gives time a loose relation to the number of turns played, it feels surprisingly realistic: players tend to think of time in a story in terms of the number of significant moves they made, while the random wandering, taking inventory, and looking at room descriptions while stuck don't make as big an impression. So advancing the story clock alongside the player's puzzle solutions or plot progress can work just as well as any stricter calculation.

See Also

Passers-By, Weather and Astronomical Events for cycles of day and night scenes.
Waiting, Sleeping for commands to let the player wait until a specific time or for a specific number of minutes.
Clocks and Scientific Instruments for clocks that can be set to times and that have analog or digital read-outs.
Timed Input for discussion of extensions allowing real-time input.

Examples

Printing the time of day in 24-hour time, as in military situations.
Making implicit takes add a minute to the clock, just as though the player had typed TAKE THING explicitly.
394.
Adjust time advancement so the game clock moves fifteen minutes each turn.
408.
A set of actions which do not take any game time at all.
409.
Endurance ★★
Giving different actions a range of durations using a time allotment rulebook.
183.
Turns take a quarter day each, and the game rotates through the days of the week.
260.
Zqlran Era 8 ★★★
Creating an alternative system of time for our game, using new units.

RB §4.2 Scripted Scenes

Sometimes we want to arrange a scene in which something goes on in the background (as though it were a movie playing) while the player goes about his business; or where a series of things has to happen before the player gets to the end.

The simplest way to arrange background events for a scene is to write the sequence of events into a table and work our way through it, printing one line per turn, until the scene runs out. Day One ★★★ does exactly this.

At other times, we want a scene to last as long as it takes the player to do something. Entrapment ★★ lets the player poke around and explore as much as he likes, but ends as soon as he has accomplished the scene's goal - which, unfortunately for him, is to get into an embarrassing situation so that another character can walk in and make fun of him. The Prague Job has a scene that requires the player to do a more specific set of tasks, but nags him and hurries him along until he's done.

Bowler Hats and Baby Geese ★★★ assumes that our story is going to be assembled with a number of scenes, some of which will need to prevent the player from leaving the location until the scene is complete: it thus defines a "restricted" property for scenes, so that all such elements of the plot will work in the same way.

For more complex sorts of scripts and schedules, it may be worth consulting the extensions.

See Also

Characters Following a Script for a character whose conversation with the player is scripted to follow a pattern and then conclude.

Examples

Scenes used to provide pacing while the player goes through his possessions.
155.
Entrapment ★★
A scene in which the player is allowed to explore as much as he likes, but another character strolls in as soon as he has gotten himself into an awkward or embarrassing situation.
Creating a category of scenes that restrict the player's behavior.
160.
Day One ★★★
A scene which plays through a series of events in order, then ends when the list of events is exhausted.

RB §4.3 Event Scheduling

We can use a schedule of events to give some life to our environment: if we have a town setting, for instance, it makes sense for shops and libraries to open and close at set times; this is just what we find in IPA ★★.

Air Conditioning Is Standard ★★★★ has characters who follow a timed schedule of events to interact with each other, while the player mostly wanders around missing out on the action. (Sometimes life is like that.) The same effects could have been achieved with scenes instead of clock times, but there are occasions when we do want to plan our characters' behavior to the minute rather than waiting for the player to be in the right place to observe it: in a murder mystery or a time-travel story, the exact timings might be quite significant.

We may also want to add events to the schedule during play, as in

Instead of pushing the egg-timer: say "It begins to mark time."; the egg-timer clucks in four turns from now.
At the time when the egg-timer clucks: say "Cluck! Cluck! Cluck! says the egg-timer."

Similarly, we can schedule things during play to happen at a specific time of day, as shown in Hour of the Wren ★★★.

See Also

Scene Changes for more things that arrive at pre-determined times.
Ships, Trains and Elevators for a train that follows a schedule, carrying the player along if he is aboard.

Examples

141.
IPA ★★
Shops which each have opening and closing hours, so that it is impossible to go in at the wrong times, and the player is kicked out if he overstays his welcome.
146.
Allowing the player to make an appointment, which is then kept.
Uses "writing a paragraph about" to make person and object descriptions that vary considerably depending on what else is going on in the room, including some randomized NPC interactions with objects or with each other.

RB §4.4 Scene Changes

In a plot that takes place over multiple locations or has several distinct scenes, we may want to move the player or change the scenery around him. Age of Steam brings a train on and off-stage as the plot requires. Meteoric ★★ similarly brings a meteor into view at a certain time of day, showing off several implementations depending on whether or not the player is supposed to be able to refer to the meteor after it has gone.

Entrevaux ★★★ constructs an organized system such that all scenes have their own lists of props and associated locations, and props are moved on and off automatically. Scene changes are also announced with a pause and a new title, such as "Chapter 2: Abduction".

Space Patrol - Stranded on Jupiter ★★ inserts an interlude in which the player's possessions and clothes are switched for new ones and the player moved to a new location - and then put back where he started from.

See Also

Flashbacks for more ways to move the player from one level of reality to another.

Examples

156.
The railway-station examples so far put together into a short game called "Age of Steam".
A meteor in the night sky which is visible from many rooms, so needs to be a backdrop, but which does not appear until 11:31 PM.
We'll be back in just a moment, with more exciting adventures of the… Space Patrol!
163.
Entrevaux ★★★
Organizing the game by scenes, where each scene has a location and prop lists so that it can be set up automatically.

RB §4.5 Flashbacks

The viewpoint character may often need to remember events long past. The easiest way to do this is with a cut-scene, in which at some relevant point we pause the story and print a long passage of text describing the memory. Because large amounts of text can be hard for the player to take in, we may want to include some pauses in the presentation of this material; this facility is provided by the Basic Screen Effects extension by Emily Short, and might work something like this:

Include Basic Screen Effects by Emily Short.
Instead of examining the photograph for the first time:
   say "This reminds you of the summer of '69...";
   wait for any key;
   say "... flashback content...";
   wait for any key.

The "pause the game" phrase in the same extension offers a more dramatic pause that also clears the screen before printing new text.

Cut-scenes are easy to implement but should be used sparingly, since players often get impatient with long uninteractive passages. A slightly more deluxe implementation might insert an interactive scene that simply happens to be set in the past, before going on with another scene set "now"; and, indeed, some IF abandons the idea of "now" entirely, presenting pieces in a non-chronological order and letting the player work out how the sequence works together.

The most challenging case to implement (though still not very hard) is the one where we remove the player from one scenario, let him play through a flashback with past possessions and clothing, and then restore him to the same situation he left, with all of the same possessions and clothing. Pine 3 ★★★ shows how to do this: the code to change the player's status is isolated at the end of the example, and might fruitfully be reused. Pine 4 ★★★ expands on the same idea by adding another flashback scene, demonstrating one that can be visited repeatedly and one that can be seen only once.

See Also

Scene Changes for more uses of stripping and restoring the player.
Background for other ways of introducing information that the player character already knows.
Alternate Default Messages for comments on how to change the tense of an interactive scene.

Examples

165.
Pine 3 ★★★
Pine: Allowing the player to visit aspects of the past in memory and describe these events to the princess, as a break from the marriage-proposal scene.
167.
Pine 4 ★★★
Pine: Adding a flashback scene that, instead of repeating endlessly, repeats only until the Princess has understood the point.

RB §4.6 Plot Management

A plot manager (sometimes called a drama manager) is a piece of the program whose job it is to plan out events so that, whatever the player does, the story advances and an interesting narrative results. The plot manager might, for instance, decide that the player has wandered around for too many scenes without making any progress, and might compensate by making something happen that gives him a new hint on his current problem. It might trigger characters to act when it thinks the story should be reaching a crisis point. It might introduce new complications when it determines that the player is running out of problems to solve.

This is a theoretically challenging field. Sophisticated plot management requires that the story make difficult guesses, such as whether the player is "stuck" and what the player is working on right now. The advantage of using such a system is that (done very well) it makes the story extremely responsive to the player's behavior, which means that he is a real agent in the unwinding of the plot. It also contributes to the replayability, since trying the story a second or third time will produce quite different outcomes. But it is procedurally difficult to design a good plot management system and it requires a huge amount of content, as well: in order for the plot manager to give the player hints, change the course of events to suit his focus, and so on, the story has to have available many, many more scenes than will ever occur in any single playing.

Fate Steps In ★★★ is only a very brief sketch in this direction, one in which the "fate" entity is trying to accomplish an end goal and, every turn, looks for ways to push the story towards that conclusion, whatever the player does.

See Also

Goal-Seeking Characters for alternate ways to make characters act on their own.

Example

209.
Fate Steps In ★★★
Fate entity which attempts to make things happen, by hook or by crook, including taking preliminary actions to set the player up a bit.