3.2. Map

| Chapter 3: Place |

| 3.2. Map

A work of IF contains many spectacles and activities, and these must not all present themselves at once, or the player will be overwhelmed. One way to spread them out is in time, by having them available only as a plot develops, but another is to spread them out literally in space. The player has to walk between the Library and the Swimming Pool, and thus bookish and athletic tasks are not both presenting themselves at once. There have been valiant "one-room" IFs, and it forms a respectable sub-genre of the art, but most works of any size need a map.

Inform, following IF conventions, divides the world up into locations called "rooms", connected together by so-called "map connections" along compass bearings. Thus:

> The Library is east of the Swimming Pool.

The example Port Royal 1 develops a medium-sized map from such sentences. This develops in Port Royal 2 to include connections which bend around, allowing the rooms not to lie on an imaginary square grid.

Because it is useful to group rooms together under names describing whole areas, Inform also allows rooms to be placed in "regions". Thus:

> The Campus Area is a region. The Library and the Swimming Pool are in the Campus Area.

Port Royal 3 demonstrates this further. A&E shows how regions can be used to write simple rules which regulate access to and from whole areas of the map.

Many old-school IF puzzles involve journeys through the map which are confused, randomised or otherwise frustrated: see Bee Chambers for a typical maze, Zork II for a randomised connection, Prisoner's Dilemma for a change in the map occurring during play. A completely random map takes us away from traditional IF and more towards a different sort of old-school game, the computerised role-playing game with its endless quests through dungeons with randomly generated treasures and monsters. This style of map - building itself one step at a time, as the player explores - can sometimes be useful to provide an illusion of infinite expanse: see All Roads Lead To Mars.

While the standard compass directions are conventional in IF, there are times when we may want to replace them without other forms of directional relationship. Indirection renames the compass directions to correspond to primary colors, as in Mayan thinking. The World of Charles S. Roberts substitutes new ones, instead, introducing a hex-grid map in place of the usual one.

See Going, Pushing Things in Directions for ways to add more relative directions, such as context-sensitive understanding of OUT and IN

See Room Descriptions for ways to modify the room description printed

See Ships, Trains and Elevators for rooms which move around in the map and for directions aboard a ship

4
| Example Port Royal 1 A partial implementation of Port Royal, Jamaica, set before the earthquake of 1692 demolished large portions of the city. |
WI

7
| Example Port Royal 2 Another part of Port Royal, with less typical map connections. |
WI

9
| Example Port Royal 3 Division of Port Royal into regions. |
WI

101
| Example A&E Using regions to block access to an entire area when the player does not carry a pass, regardless of which entrance he uses. |
WI

125
| Example Bee Chambers A maze with directions between rooms randomized at the start of play. |
WI

134
| Example Zork II A "Carousel Room", as in Zork II, where moving in any direction from the room leads (at random) to one of the eight rooms nearby. |
WI

38
| Example Prisoner's Dilemma A button that causes a previously non-existent exit to come into being. |
WI

77
| Example All Roads Lead to Mars Layout where the player is allowed to wander any direction he likes, and the map will arrange itself in order so that he finds the correct "next" location. |
WI

276
| Example Indirection Renaming the directions of the compass so that "white" corresponds to north, "red" to east, "yellow" to south, and "black" to west. |
WI

In Mayan culture, colours seem to have been used as names for the primary directions: for instance, "red" implies east as the colour of sunrise. So the following might be a stylish touch for a game in which the player has to get inside the Mayan world-view: "Indirection" Understand "white" and "sac" as north. Understand "red" and "chac" as east. Understand "yellow" and "kan" as south. Understand "black" and "chikin" as west. We could also use a colour as a verb: Understand "turquoise" and "yax" as looking. And now a few extra rooms to try it out in: The Square Chamber is a room. "A sunken, gloomy stone chamber, ten yards across. A shaft of sunlight cuts in from the steps above, giving the chamber a diffuse light, but in the shadows low lintelled doorways to east and south lead into the deeper darkness of the Temple." The Wormcast is east of the Square Chamber. The Corridor is south of the Square Chamber. Test me with "kan / white / chac / black".

39
| Example The World of Charles S. Roberts Replacing the ordinary compass bearings with a set of six directions to impose a hexagonal rather than square grid on the landscape. |
WI

Previous | Contents | Next