| Chapter 10: Scenes |

| 10.3. Using the Scene index

But when we test the previous section's example, we find that after a brief wait, the train pulls up: but it never goes away again. We have given instructions on how the scene ends, but not when it ends, and as a result the scene goes on forever once started.

Even with simple story-lines, and this one could hardly be simpler, it is surprisingly easy to overlook something so that the whole story-line is derailed.

The Scene index is intended to help with this. At the top is a chart showing all the scenes and how they are to begin, along with a key to the symbols used on it. One scene always included is "Entire Game", a special scene which, as its name implies, is always being played out. But if we look at the Scene index for the previous example, we will also see our Train Stop scene, and find that it is marked with the red warning symbol for "never ends". Let us fix this:

> Train Stop ends when the time since Train Stop began is 3 minutes.

Note the useful value "time since Train Stop began". (This only makes sense if the scene has begun, of course.) The actual time, in case it is needed, can be obtained with "time when Train Stop began".

| The testing command SCENES causes Inform to monitor the beginning and ending of scenes, and report on them. For instance: >ask monk about lodging "Welcome a poor traveler for the night?" you ask, rubbing your fingers together to restore a little feeling. The monk looks you up and down for a moment and you sense his reaction hanging in the balance; then he slaps you on the back, hard enough to drive the air from your lungs. "In." [Scene 'Greeting' ends] The monk takes your elbow and pushes you imperiously toward dinner. [Scene 'Banquet' begins]

125
| Example Age of Steam The railway-station examples so far put together into a short game called "Age 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. "Age of Steam" 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: move the Flying Scotsman to the Station; say "The Flying Scotsman pulls up at the platform, to a billow of steam and hammering." When Train Stop ends: remove the Flying Scotsman from play; 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." Test me with "z / z / z / enter flying scotsman / z / z".

Previous | Contents | Next