Inform 7 Home Page / Documentation
§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 Flashbacks for more ways to move the player from one level of reality to another
ExampleAge of Steam |
The following source is very short and simple, yet it already feels surprisingly interesting in play, because something is going on which the player does not control but must observe. The single scene both starts and finishes.
The Station is a room. "Eynforme Halt is a raised platform fringed with cowslip: a whistle-stop with no more than a signal and a water-tank."
The Flying Scotsman is fixed in place. "The Flying Scotsman, fastest train in the world, is now at a dead standstill."
Train Stop is a scene. Train Stop begins when the player is in the Station for the third turn. Train Stop ends when the time since Train Stop began is 3 minutes.
When Train Stop begins:
now the Flying Scotsman is in the Station;
say "The Flying Scotsman pulls up at the platform, to a billow of steam and hammering."
When Train Stop ends:
now the Flying Scotsman is nowhere;
say "The Flying Scotsman inches away, with a squeal of released brakes, gathering speed invincibly until it disappears around the hill. All is abruptly still once more."
Instead of entering the Flying Scotsman, say "Alas, the [time when Train Stop began] arrival is only to take on water, not to set down or pick up."
ExampleMeteoric I and II |
The game below begins at half past eleven, and one turn later, it's meteor time:
At 11:31 PM:
now the meteor is in the great outdoors;
say "A meteor streaks across the sky.".
The great outdoors is a region. The Spanish Balcony is east of the Inner Court. The Court and Balcony are in the great outdoors. Inside from the Court is the Swimming Pool.
The meteor is a backdrop. Instead of doing something to the meteor, say "The meteor is no longer visible, now nothing more than a memory."
Test me with "wait / wait / examine meteor / west / examine meteor / in / examine meteor".
Or for something a little slower-moving and with no after-image:
At 4:31 PM:
now Phobos is in the great outdoors;
say "Phobos rises from the western horizon."
At 10:06 PM:
now Phobos is nowhere;
say "Phobos sets over the eastern horizon."
The great outdoors is a region. The Martian Balcony is east of the Inner Court. The Court and Balcony are in the great outdoors. Inside from the Court is the Heavy Water Swimming Pool.
Phobos is a backdrop. Instead of doing something to Phobos, say "Phobos orbits a mere 6000km above you, which is practically touching range for astronomy. On the other hand, astronomy isn't all that practical."
Test me with "wait / wait / examine phobos / west / examine phobos / in / examine phobos".
Though we should not really use Earthly time-keeping, since the Martian day is about half an hour longer than ours.
ExampleSpace Patrol - Stranded on Jupiter! |
American radio adventure series of the 1950s were unobtrusively sponsored by breakfast cereals, as the following modest example demonstrates. Note that the scene-changing for the commercial break needs to know nothing about the actual programme it breaks into: if Part I were replaced with a different Space Patrol episode, Part II need not be changed at all.
Red Spot is a room. "You are in the middle of a vast red oval plain. Overhead, the thick Jovian clouds swirl menacingly, and a fine acrid dust falls instead of rain." Some acrid dust is scenery in the Red Spot. The description of the dust is "The rust-colored dust coats every surface. You've no idea how deep it goes."
Instead of going in Red Spot, say "As you once told Cadet Lucky, Jupiter's a mighty big planet, maybe bigger than Iowa. Why, the Red Spot alone stretches out almost to the horizon."
The player wears a silver uniform and rubber boots. The player carries a shovel and an Analscope. The description of the Analscope is "As you recall from Space Patrol #9 - 1952-11-29 - The Electronic Burglar, the Analscope is a device for locating buried metals. That's what guided you all the way from the orbit of Uranus. (Oh, all right, Neptune.) If only you hadn't crashed!"
The metal plate is a fixed in place container. It is openable and closed. In the metal plate is some water. The description of the metal plate is "Stamped with the distinctive logo of the previous mission."
Instead of examining the player, say "Your hair clumps together stickily, thanks to the dustfall."
Digging is an action applying to one thing. Understand "dig [something]" or "dig in [something]" as digging.
Instead of digging the dust, try looking under the dust. Instead of looking under the dust when the metal plate is not visible: move the metal plate to the location; say "You brush aside the dust underfoot and -- what were the odds? -- it turns out that you landed just where the previous landing party did, thirteen ill-fated years ago. Here is the metal plate that covers their original well.
But wait! Called by the clanging of your shovel on the plate, a band of Jovian pterodactyls swoop down to attack! You're totally defenceless! You don't have a hope! You're absolutely finished!"; increase the score by 10; move K-Klak to Red Spot.
K-Klak the Pterodactyl is an animal. "K-Klak, leader of the Jupiter Pterodactyls, menaces you. A terrifying creature of scaly wings, with a dragon's tail, K-Klak stands... about 1/8th of an inch tall." Instead of doing something to K-Klak, say "K-Klak makes a frankly panicky noise and leaps backwards, out of your way."
After opening the metal plate: increase the score by 10; say "You have found water! You're saved! K-Klak makes a (very cautiously) pleased noise. Now to find the stolen Brainograph, and track down the crook with the thick Jewish accent and his henchmen with their thick Polish accents..."; end the story finally.
When play begins, say "Instant Ralstons and Regular Ralstons, the hot whole-wheat cereals in the red and white checkerboard packages present... SPACE PATROL... High adventure in the wild vast reaches of space... Missions of daring in the name of interplanetary justice... Travel into the future as Buzz Corey, Commander-in-Chief of the..."
Last score is a number that varies. Every turn: now the last score is the score.
Ralstons Ad is a scene. Ralstons Ad begins when score is not the last score. Ralstons Ad ends when the Ricechex is consumed.
When Ralstons Ad begins:
center "*** We'll be back in just a moment! ***";
pause the game;
strip the player;
move the player to the Kitchen.
When Ralstons Ad ends:
center "*** And now, back to today's exciting adventure ***";
pause the game;
restore the player.
Saved location is a room that varies. Locker is a container. Wardrobe is a container.
To strip the player:
now every thing carried by the player is in the locker;
now every thing worn by the player is in the wardrobe;
now saved location is location.
To restore the player:
now every thing carried by the player is in the Kitchen;
now every thing in the locker is carried by the player;
now every thing in the wardrobe is worn by the player;
move the player to saved location.
The Space Patrol Kitchen is a room. "The nerve center of the Space Patrol! This is where cadets fill up with their SUPER-FUEL. North leads to the astro control room, while back south is the cargo hold." A breakfast bowl is in the Kitchen. In the bowl is Ricechex. Ricechex is edible. The Ricechex can be consumed or uneaten. The Ricechex is uneaten.
Instead of going north in Kitchen: say "[refusal to leave]". Instead of going south in Kitchen: say "[refusal to leave]".
Instead of examining the player when Ralstons Ad is happening: say "You are currently being played by a generically attractive person of about 30, with very good teeth and well-kept nails."
After eating the Ricechex: say "That's right folks, always start your day the SPACE PATROL way with a tasty bowl of Ricechex, Wheatchex or good hot Ralstons. Mmmm Mmmm. You just can't get enough of the sugary goodness in Ricechex, Wheatchex and good hot Ralstons."; now the ricechex is consumed.
Instead of tasting the Ricechex:
say "Wow! *wolf-whistle* Man oh man oh man! Yumm-y!"
To say refusal to leave:
repeat through Table of Refusals:
say "[nope entry][paragraph break]";
blank out the whole row;
rule succeeds;
say "You can't. Eat your Ricechex."
Table of Refusals
nope
"You can't go that way in the limited universe of this sponsored message."
"Or that way."
"You've already tried that!"
"Why would you want to walk away when you have an alluring bowl of Ricechex right here?"
Test ad with "n / s / n / s / n / i / x me / get bowl / taste ricechex / eat ricechex".
Episode 57 of "Space Patrol" was actually called "Iron Eaters Of Planet X", just in case the reader feels that any of the foregoing unfairly traduces a work of thoughtful science fiction.
ExampleEntrevaux |
For some games, it makes sense to organize the entire game around scenes rather than around locations, moving the player when a new scene begins and laying out new props.
To this end, we might extend Inform's default handling of scenes so that each scene has properties to indicate prop lists and locations, and move objects in and out of play automatically as the scenes change. For instance:
The starting location is the room to which the player should be moved; scenery props are things that need to be put there when the scene begins; inventory props, things that are given to the player when the scene begins; and the description some printed text to introduce the new scene. We may still occasionally need to have recourse to special "When the Dancing-Lesson begins..." rules for individual scenes, but for the most part this allows us to set scenes up in a consistent and predictable way.
Another point that might be slightly less obvious: sometimes we want to announce a change of location to the player when the scene starts, and sometimes we don't. In particular any scene that starts "when play begins" should probably not explicitly describe the entered room, since that would duplicate the description automatically produced on the first turn of play. So we add a property to track whether any given scene should be announcing its location:
And let's say that we also want to announce each new scene as another "chapter" of the game in play, with a pause before the scene begins.
Here we include "Basic Screen Effects" because it will allow us to pause the game for a keypress, then clear the screen before each new chapter:
First when a scene (called the current scene) which is not the Entire Game begins:
if chapter counter is greater than 0:
pause the game;
increment chapter counter;
say "[bold type]Chapter [chapter counter]: [current scene][roman type]";
Last when a scene (called the current scene) which is not the Entire Game begins:
repeat with item running through the scenery props of the current scene:
move the item to the starting location of the current scene;
repeat with item running through the inventory props of the current scene:
move the item to the player;
if the location is not the starting location of the current scene:
if the current scene is location-loud:
move the player to the starting location of the current scene;
otherwise:
move the player to the starting location of the current scene, without printing a room description.
At the end of each scene, we strike the set and remove all the loose objects from play.
When a scene (called the current scene) ends:
repeat with item running through things which are not fixed in place:
if the item is not the player:
now the item is nowhere.
Entrevaux Station is a room. "The station building consists of a waiting room and a ticket-selling office so small that only one person can buy a ticket at a time. On the outside wall is a clock that runs twelve minutes late; but since the trains also run twelve minutes, give or take, behind their published schedule, this clock is helpful in establishing reasonable expectations. [paragraph break]Painted on the door is the logo of the Chemin de Fer de Provence, the only railway in France that is not part of the SNCF."
The Hillside Tower is a room. "It's very dark in here, lacking artificial lighting, but from the rough rectangular window you can see a slice of hillside and a little of the river Var."
The window is scenery in the Hillside Tower. The description is "Through it can be seen a slice of wooded hillside and exposed grey-brown cliff. You are in the southern French foothills of the Alps, and the territory is dry. The only respite is the river Var, a milky blue at this time of year, running shallowly over mud and large stones far below your window." Understand "view" or "slice of hillside" or "hillside" or "hill" or "river" or "var" or "mud" or "stones" or "large stones" as the window.
A used ticket is a thing. The description is "A piece of receipt paper indicating that you have paid the one-way fare of 9 euros from Nice. There is a hole punched through it."
A one-euro coin is a thing. The description is "It's a bimetal coin, brassy around the rim and silvery in the center. One side shows western Europe, with unusual prominence given to the UK, and the other side Leonardo da Vinci's four-armed, four-legged man having a nice stretch. It's dated 2002."
Some re-enactors are a person. "Milling about one end of the station is a crowd of medieval re-enactors." The description is "They're dressed in a somewhat aimless range of styles roughly honoring the period of 900-1500 AD. One gentleman is wearing a knobby leather cap; which is a good thing, because there is a rooster standing on his head." Understand "men" or "man" or "gentleman" or "rooster" or "reenactors" or "crowd" or "medieval" or "woman" or "women" as the re-enactors.
A kidnapper is a person. "Your kidnapper is watching you from the corner with his arms folded. You have the impression he's just marking time until someone more important arrives." The description is "He does not look at all like the kidnapping sort, but more like a sommelier at a superior restaurant: he wears a black pinstriped suit and has nicely-manicured hands."
The trolley is an enterable fixed in place container. "The 'train' on which you arrived is really just a single car, more like a trolley than a proper train." Understand "car" or "train" as the trolley. The description is "It has a glass front, so you can see ahead while riding: an innovation among trains."
Arrival is a location-silent scene. "After many days['] journey, you have arrived at last in Entrevaux, a walled medieval town now chiefly of interest to tourists and crusade re-enactors."
The starting location of Arrival is the Entrevaux Station.
The scenery props of Arrival are { re-enactors, trolley }.
The inventory props of Arrival are { the used ticket, one-euro coin }.
Arrival begins when play begins. Arrival ends when the time since Arrival began is 2 minutes.
Abduction is a location-loud scene. "You check into the Hotel Vauban and sleep deeply enough; it was a long and sticky trip to get here.
Then in the middle of the night something confusing happens. You have the impression of strangers in your room, and then a searing pain, and you don't come back to yourself until midmorning of the following day..."
The starting location of Abduction is the Hillside Tower.
The scenery props of Abduction are { kidnapper }.