3.1. Descriptions

| Chapter 3: Things |

| 3.1. Descriptions

At its simplest, the interactive fiction will be simulating a physical world to explore. The forerunner of today's IF is generally agreed to be a computer simulation by Will Crowther of the exploration of a cave system in the Mammoth and Flint Ridge chain of caves in Kentucky, a part of which might be described in Inform thus:

> "Cave Entrance"

> The Cobble Crawl is a room. "You are crawling over cobbles in a low passage. There is a dim light at the east end of the passage."

> A wicker cage is here. "There is a small wicker cage discarded nearby."

> The Debris Room is west of the Crawl. "You are in a debris room filled with stuff washed in from the surface. A low wide passage with cobbles becomes plugged with mud and debris here, but an awkward canyon leads upward and west. A note on the wall says, 'Magic word XYZZY'."

> The black rod is here. "A three foot black rod with a rusty star on one end lies nearby."

> Above the Debris Room is the Sloping E/W Canyon. West of the Canyon is the Orange River Chamber.

Here we sketch in four of Crowther's locations, and two objects: just enough to be able to walk around the caves and pick up the rod and the cage. The text in quotation marks will appear verbatim as paragraphs shown to the player as the caves are explored. The first paragraph, as we have seen, is the title of the work. The other quotations describe the places and objects introduced.

If we play this game, we find that we can type TAKE CAGE or TAKE WICKER CAGE, for instance, but not TAKE SMALL CAGE. Inform saw that we called this "a wicker cage" when it first appeared in the source text, and assumed that the player would call it that, too. (Whereas it didn't look inside the descriptive text to allow for TAKE SMALL CAGE or TAKE DISCARDED CAGE or TAKE NEARBY CAGE.) A small limitation here is that probably only the first 9 letters of each word are read from the player's command. This is plenty for handling the wicker cage and the black rod, but it might be embarrassing at a meeting of the Justice League to find that KISS SUPERHERO and KISS SUPERHEROINE read as if they are the same command.

So we have already found that Inform has made some assumptions about what we want, and imposed some limitations on how much computational effort to go to when the work of IF is finally played. If Inform guesses what we need wrongly, we need to know more advanced features of the language in order to overcome these problems. (We shall see how to change the way the player's commands are read in the chapter on Understanding.) This is often how Inform works: make the standard way of doing things as simple as possible to describe, but allow almost any behaviour to be altered by more elaborate source text.

2
| Example Verbosity 1 Making rooms give full descriptions each time we enter, even if we have visited before. |
RB

By default, the description of a room is printed only when the player enters that room for the first time. Afterwards, the text is skipped, for brevity, though the player can see it again at any time by typing LOOK. This is not always desirable behavior, though, especially when the description of a room changes during play or we want to be sure that the player has access to all the important details: so it is also possible to supply a different default. As we saw in the previous chapter, we can set "use options" to control certain aspects of the player's experience. One of the use options is the option to Use full-length room descriptions. which changes the defaults so that the description of a room is printed every time a player enters a room, whether or not he has been there previously. "Verbosity" Use full-length room descriptions. The Wilkie Memorial Research Wing is a room. "The research wing was built onto the science building in 1967, when the college's finances were good but its aesthetic standards at a local minimum. A dull brown corridor recedes both north and south; drab olive doors open onto the laboratories of individual faculty members. The twitchy fluorescent lighting makes the whole thing flicker, as though it might wink out of existence at any moment. The Men's Restroom is immediately west of this point." The Men's Restroom is west of the Research Wing. "Well, yes, you really shouldn't be in here. But the nearest women's room is on the other side of the building, and at this hour you have the labs mostly to yourself. All the same, you try not to read any of the things scrawled over the urinals which might have been intended in confidence." Test me with "west / east". If we type "test me" during play, these commands will be carried out automatically, and we can see that when we return to the Research Wing, the description is given a second time. Some notes: the player can also turn full-length descriptions on or off with the commands "verbose" and "brief", or set a minimal-description setting with the command "superbrief". This power still belongs to the player even if we have set the use option to show full-length room descriptions by default. See the Writing with Inform chapter on use options for more discussion of these points. Moreover, we can ourselves check what the state of the descriptions is, with if set to sometimes abbreviated room descriptions: ... if set to unabbreviated room descriptions: ... if set to abbreviated room descriptions: ... Finally, it is possible to exercise more precise control over what the player sees on his first and subsequent visits to a room; see the next example for details.

3
| Example Slightly Wrong A room whose description changes slightly after our first visit there. |
RB

Previous | Contents | Next