Chapter 3: Place
3.4. Doors, Staircases, and Bridges

Inform's "door" kind provides for a tangible thing which comes between one room and another. A door can be open or closed, and openable or not: it can be locked or unlocked, and lockable or not. Here we create a conventional door, a natural gap in the rocks, and a (fixed in place) wooden ladder:

The fire door is an open door. The fire door is east of the Projection Booth and west of the Fire Escape.
The narrow crevice is an open unopenable door. The crevice is east of the Col du Prafleuri and west of Rocky Knoll Above Arolla.
The wooden ladder is an open unopenable door. The ladder is above the Stableyard and below the Hay Loft.

Most doors are visible from both sides: they are single objects but present in two rooms at once, which raises a number of complications. Inform normally uses the same description looking from each way, which is not very interesting: When? and Whence? demonstrate neat ways to describe the two sides differently. Neighbourhood Watch goes further by making a door behave differently on each side: from the "outside" you need a key, but "inside" it opens on a latch. Finally, Garibaldi 1 shows how to access information about the two sides of a door.

Higher Calling demonstrates doors which automatically open as needed: though using the Inform extension Locksmith by Emily Short is probably easier and better.

Something Narsty and Hayseed provide a "staircase" kind useful for vertically arranged, always-open doors like staircases and (fixed in place) ladders.

One Short Plank implements a precarious plank bridge across a chasm as an open unopenable door.

* See Windows for climbing through a window from one room to another

* See Ropes for portable connections between rooms, much of the development of which could be adapted to handle portable ladders. "Doors" are never allowed to move


58
* Example  When?
A door whose description says "...leads east" in one place and "...leads west" in the other.

WI
60
*** Example  Whence?
A kind of door that always automatically describes the direction it opens and what lies on the far side (if that other room has been visited).

WI

It would be fairly tedious reading to have a large game full of doors that describe themselves this way. Nonetheless, if we insisted we could use our knowledge of the map as leverage to make every door in the game describe itself automatically:

"Whence?"

The temporal vortex is an open door. It is west of Yesterday and east of Today.

The initial appearance of a door is usually "Nearby [an item described] leads [if the other side of the item described is visited][way through the item described] to [the other side][otherwise][way through the item described][end if]."

To decide what direction is the way through (frame - a door):
    let far side be the other side of frame;
    let way be the best route from the location to the far side, using even locked doors;
    if way is a direction, decide on the way;
    decide on inside.

Test me with "w / e".

117
* Example  Higher Calling
All doors in the game automatically attempt to open if the player approaches them when they are closed.

WI
23
** Example  Neighborhood Watch
A locked door that can be locked or unlocked without a key from one side, but not from the other.

WI
21
*** Example  Garibaldi 1
Providing a security readout device by which the player can check on the status of all doors in the game.

WI
40
* Example  Something Narsty
A staircase always open and never openable.

WI
81
* Example  Hayseed
A refinement of our staircase kind which can be climbed.

WI
100
** Example  One Short Plank
A plank bridge which breaks if the player is carrying something when he goes across it. Pushing anything over the bridge is forbidden outright.

WI


PreviousContentsNext