Inform 7 Home Page / Documentation


Chapter 9: Time

§9.1. When play begins; §9.2. Awarding points; §9.3. Introducing tables: rankings; §9.4. When play ends; §9.5. Every turn; §9.6. The time of day; §9.7. Telling the time; §9.8. Approximate times, lengths of time; §9.9. Comparing and shifting times; §9.10. Calculating times; §9.11. Future events; §9.12. Actions as conditions; §9.13. The past and perfect tenses; §9.14. How many times?; §9.15. How many turns?

arrow-up-left.png Contents of Writing with Inform
arrow-left.png Chapter 8: Change
arrow-right.png Chapter 10: Scenes
arrow-down-right.png Indexes of the examples

§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 story:

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 story, not when a saved session is restored from disc. What happens is that these rules are followed, then the story's banner is printed, then the initial room description is printed up, and then the player is asked for a first command.


arrow-up.png Start of Chapter 9: Time
arrow-left.png Back to Chapter 8: Change: §8.19. Random choices of things
arrow-right.png Onward to §9.2. Awarding points

*ExampleClueless
A murderer for the mystery is selected randomly at the beginning of the game.