§3.6. Windows
Calvin Coolidge once described windows as "rectangles of glass." For us, they have two purposes: first, they offer a view of landscape beyond. In the simplest case the view is of an area which will not be interacted with in play, and therefore does not need to adapt to whatever may have changed there:
The window is scenery in the Turret. "Through the window you see miles and miles of unbroken forest, turning from green to flame in the hard early autumn."
More interesting is to adapt the view a little to provide a changing picture: a forest may not change much, but a street scene will. Port Royal 4 allows us to glimpse random passers-by.
The trickiest kind of window allows the player to see another room which can also be encountered in play, and to interact with what is there. Dinner is Served presents a shop window, allowing people to see inside from the street, and even to reach through.
Vitrine handles the complication of a window misting up to become opaque, and thus temporarily hiding its view.
Second, windows provide openings in walls and can act as conduits. Escape shows how a "door" in the Inform sense can become a window. A Haughty Spirit provides a general kind of window for jumping down out of: ideal for escapers from Colditz-like castles.
See Doors, Staircases, and Bridges for a door which can be partially seen through
|
|
|
|
Suppose we have a game in which the player can climb through windows which overlook rooms below. We want him to be allowed to climb out windows to reach a room on the same level or at most one level lower than the one he's on; otherwise, he should get a refusal, saying that he would break his neck. To figure out the height distance between the start room and the destination room, we might have a repeat loop look at all the directions one has to follow along the "best route" path between the two rooms, and record any ups and downs; then subtract the number of "up" steps from the number of "down" steps, and report what remains.
Now we just have to create windows and some action rules for interacting with them...
Here we must anticipate a little from next chapter, and provide ourselves with a way of keeping track of how windows and rooms relate to one another:
We could then add rules to allow the player to look through windows and see things in the rooms below, but that would require more material from later chapters. |
|
Suppose we have a game in which the player can climb through windows which overlook rooms below. We want him to be allowed to climb out windows to reach a room on the same level or at most one level lower than the one he's on; otherwise, he should get a refusal, saying that he would break his neck. To figure out the height distance between the start room and the destination room, we might have a repeat loop look at all the directions one has to follow along the "best route" path between the two rooms, and record any ups and downs; then subtract the number of "up" steps from the number of "down" steps, and report what remains.
Now we just have to create windows and some action rules for interacting with them...
Here we must anticipate a little from next chapter, and provide ourselves with a way of keeping track of how windows and rooms relate to one another:
We could then add rules to allow the player to look through windows and see things in the rooms below, but that would require more material from later chapters. |