Chapter 3: Things
§3.1. Descriptions; §3.2. Rooms and the map; §3.3. One-way connections; §3.4. Regions and the index map; §3.5. Kinds; §3.6. Either/or properties; §3.7. Properties depend on kind; §3.8. Scenery; §3.9. Backdrops; §3.10. Properties holding text; §3.11. Two descriptions of things; §3.12. Doors; §3.13. Locks and keys; §3.14. Devices and descriptions; §3.15. Light and darkness; §3.16. Vehicles and pushable things; §3.17. Men, women and animals; §3.18. Articles and proper names; §3.19. Carrying capacity; §3.20. Possessions and clothing; §3.21. The player's holdall; §3.22. Food; §3.23. Parts of things; §3.24. Concealment; §3.25. The location of something; §3.26. Directions
![]() | Contents of Writing with Inform |
![]() | Chapter 2: The Source Text |
![]() | Chapter 4: Kinds |
![]() | Indexes of the examples |
§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:
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. As an example of that, the player begins in the Cobble Crawl because it was the first room created in the source text, but we could instead have written text like:
The player is in the Cobble Crawl.
to override that. This can make the source text easier to follow if the rooms are sometimes being created in a less obvious way. For example, if we write:
The silver bars are in the Y2 Rock Room.
The Cobble Crawl is a room. South of the Crawl is Y2.
then the first room to be created will actually be the Y2 Rock Room, so that's where the player will be starting unless we say otherwise.
![]() | Start of Chapter 3: Things |
![]() | Back to Chapter 2: The Source Text: §2.16. Does Inform really understand English? |
![]() | Onward to §3.2. Rooms and the map |
By default, the description of a room is printed every time the player enters a room. On a device with very limited screen space, however, we might wish to supplant that behavior with "brief" descriptions. In Brief mode, Inform prints room descriptions 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. 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
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.
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
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. |
|
By default, the description of a room is printed every time the player enters a room. On a device with very limited screen space, however, we might wish to supplant that behavior with "brief" descriptions. In Brief mode, Inform prints room descriptions 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. 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
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.
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
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. By default, the description of a room is printed every time the player enters a room. On a device with very limited screen space, however, we might wish to supplant that behavior with "brief" descriptions. In Brief mode, Inform prints room descriptions 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. 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
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.
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
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. |
|
|