6.17. Review of Chapter 6: Descriptions

| Chapter 6: Descriptions |

| 6.17. Review of Chapter 6: Descriptions

1. The lexicon. Inform's lexicon is not just a figure of speech: Inform actually does maintain an alphabetical list of nouns and adjectives which can be used in descriptions, and that lexicon can be browsed in a project's Index.

To summarise. Nouns are straightforward: they refer to specific things ("wine cask") or specific kinds (even "something", which refers to "thing") or specific kinds of value ("number"). Adjectives, however, come from several sources:

(a) From either/or properties. For instance, "open" and "closed", which are antonyms: what is not open is closed, and vice versa.

(b) When we create a new kind of value, and allow it to be a property of a given kind, we also create new adjectives:

> Colour is a kind of value. The colours are red, blue and green. A building block is a kind of thing. A building block has a colour.

We can now use the adjective "green" (for instance) in descriptions:

> Instead of taking a green building block, say "For some reason you have an aversion to the colour green."

And similarly when we use the more convenient form for single things, such as the cask in this example:

> The cask is either customs sealed, liable to tax or stolen goods.

(c) From direct definitions, such as the adjective "occupied" created by:

> Definition: a supporter is occupied if something is on it.

(d) We can define adjectives that describe properties falling within a certain range, like so:

> Definition: A container is large if its carrying capacity is 10 or more.
> Definition: A container is standard if its carrying capacity is 7.
> Definition: A container is small if its carrying capacity is 5 or less.

Then we can make comparisons and look for the most extreme examples of things:

> if the basket is larger than the thimble ...
> if the thimble is not larger than the basket ...
> if the bag is the same carrying capacity as the basket ...
> if the thimble is smaller than the basket ...
> if the thimble is the largest visible container ...
> let the current container be the smallest container carried by the player.

2. Descriptions. As we have seen, we are also allowed to use more complicated descriptions of things:

> an open container on the table
> a woman inside a lighted room
> something which is worn by somebody
> a man who does not wear anything
> something which supports something

For the time being, this ability is of only limited use, but we will see shortly that it will let us write instructions for what the game should do under complex circumstances; e.g.,

> Before taking something which is in a closed transparent container: ...
> Instead of wearing something which offends the player: ...

We are allowed also to count the number of objects that correspond to a description, as in

> the number of women who are concealing weapons

and we may ask how many of a category correspond to a description:

> if each door is open
> if anyone is carrying all of the animals
> if everybody is in the Dining Room
> if some of the doors are open
> if most of the doors are open (i.e., more than half)
> if almost all of the doors are open (i.e., 80 percent or more)
> if two women are carrying animals
> if at most three doors are open
> if fewer than 10 portable containers are closed
> if all but two of the devices are switched on

As we have seen,

> if two doors are open

is equivalent to

> if at least two doors are open

but we may insist on exactitude with

> if exactly two doors are open

3. Seeing and touching. We may also talk about what can be seen and touched by the player (or by other characters or even other objects):

> if the rubber chicken is visible

means the same thing as

> if the player can see the rubber chicken

but we the player need not be the focus of the question:

> if the video camera can see the felon
> if the pool is able to be touched by the live wire

The chapter on Advanced Actions discusses how we may change Inform's definition of what can be seen or touched, if that becomes necessary; the chapter on Relations shows how to create other "is able" conditions.

4. Routes through the map. "An adjacent room" is a room which can be reached in a single move from the player's current location, via a path that does not pass through any doors (open or closed).

> a room adjacent to the Factory Floor

applies the same criterion to the Factory rather than the current location. We may also talk about

> the room east from the Factory Floor

for example, or more complicatedly,

> best route from the location to the Lodestone Room
> best route from the location to the Lodestone Room, using doors
> best route from the location to the Lodestone Room, using even locked doors

where the best route will be the direction to travel first when moving towards the Lodestone Room, and the optional "using doors" and "using even locked doors" indicate whether these paths should be included. Moreover, we can plot a course only through rooms that meet a certain criterion, as in

> best route from the Drawbridge to the Keep through visited rooms
> best route from the Drawbridge to the Keep through lighted rooms, using doors

This can be especially useful in the case where we want to find a path for the player but only allow him to travel through rooms he has already seen once; but any adjective that applies to a room may be used in place of "visited" or "lighted" in these examples. We may find the lengths of these journeys with phrases like:

> number of moves from the location to the Sundial
> number of moves from the location to the Sundial, using doors
> number of moves from the location to the Sundial through visited rooms, using even locked doors

Previous | Contents | Next