| Chapter 9: Time |

| 9.1. When play begins

With the material from previous chapters, we are now able to set up a simulated world, to respond to the player's actions within it, and to make it change in perhaps unexpected ways.

The resulting experience can be as lively as we want to make it, but so far we have no very good ways to give it any structure: a beginning and an end, for instance, or a sense of plot. This next chapter is all about the passage of time, and it begins at the beginning.

We have already seen an example of how to write a rule which applies just once, at the start of the game:

> When play begins: say "Welcome to Old Marston Grange, a country house cut off by fog."

The "when play begins" rules are checked only at the start of a game, not when a saved session is restored from disc. What happens is that these rules are followed, then the game's banner is printed, then the initial room description is printed up, and then the player is asked for a first command.

108
| Example Clueless A murderer for the mystery is selected randomly at the beginning of the game.

Previous | Contents | Next