Inform 7 Home Page / Documentation


§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 Scene Changes for more uses of stripping and restoring the player

* See Background for other ways of introducing information that the player character already knows

* See Alternate Default Messages for comments on how to change the tense of an interactive scene


arrow-up.png Start of Chapter 4: Time and Plot
arrow-left.png Back to §4.4. Scene Changes
arrow-right.png Onward to §4.6. Plot Management

***ExamplePine 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.

***ExamplePine 4
Pine: Adding a flashback scene that, instead of repeating endlessly, repeats only until the Princess has understood the point.