![]() | Chapter 3: Things | ![]() ![]() |
3.12. Doors |
The map of an interactive fiction is the layout of rooms and the entrances and exits which connect them. So far, these map connections have always run from one room to another, like so:
The Painted Room is north of the Undertomb.
However, we can also interpose doors between rooms, like so:
The heavy iron grating is east of the Orchard and west of the Undertomb. The grating is a door.
The second sentence is needed since otherwise Inform will take "heavy iron grating" to be the name of a third room, whereas what we want is for the grating to be something physically present in both the Orchard and in the Undertomb, and acting as a conduit between them. To this end it needs to be a "door", a kind we have not so far seen. In the absence of any other instruction, a newly created door will be fixed in place, closed and openable.
The grating really does come in between the two rooms: the grating is what lies immediately east of the Orchard, not the Undertomb room. So if we wrote the following:
The Undertomb is east of the Orchard. The heavy iron grating is east of the Orchard and west of the Undertomb. The grating is a door.
then Inform would say that this is a contradiction: we said the Undertomb was east of the Orchard, but then we said that the grating was east of the Orchard.
Inform's "door" kind can be used for all manner of conduits, so the word door need not be taken literally. In Ursula K. LeGuin's beguiling novel "The Tombs of Atuan", from which the above rooms are stolen, it is not a grating which interposes, but:
The red rock stair is east of the Orchard and above the Undertomb. The stair is an open door. The stair is not openable.
In real life, most doors are two-sided, and can be used from either of the rooms which they join, but this is not always convenient for interactive fiction. Here is a one-sided door:
The blue door is a door. It is south of Notting Hill. Through it is the Flat Landing.
(Note the use of "it" here as an optional abbreviation.) This will make a door visible only on the Notting Hill side; no map connection will be made in the reverse direction, unless we ask for one.
Should we ever need it, the values "front side of ..." and "back side of ..." reveal where a door is placed. (For instance, "front side of the heavy iron grating" is the Orchard.)
| ![]() Disenchantment Bay: adding the door and the deck to our charter boat. |
|
| ![]() ![]() Window that can be climbed through or looked through. |
|
| ![]() ![]() ![]() Providing a security readout device by which the player can check on the status of all doors in the game. |
|
Previous | Contents | Next |