Inform 7 Home Page / Documentation
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 story, 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:
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 |
Bic |
Verbosity 1 |
Slightly Wrong |