Inform 7 Home Page / Documentation

§3.4. Regions and the index map

Rooms represent individual places to which one can go, but we tend to think of the world around us in larger pieces: we think of a house and a garden, rather than each of the single rooms of the house and all corners of its garden. To Inform a collection of rooms is called a "region", and we can create one like so:

The Arboretum is east of the Botanical Gardens. Northwest of the Gardens is the Tropical Greenhouse.

The Public Area is a region. The Arboretum and Gardens are in the Public Area.

The real usefulness of creating regions like "Public Area" will only appear later, when we begin defining rules of play which apply in some areas but not others, but in the mean time we can see the effect by turning to the World tab of the Index. In the World Index, Inform draws a map - or at least a stylised attempt at a diagram of the rooms and their connections: this will not always correspond to how we imagine things, but with any luck it should mostly be right.

Rooms are represented by coloured squares, and the colour-coding is done by region. In the above example, the two "Public Area" rooms are coloured green (as it happens); the Greenhouse, since it belongs to no region, is a neutral grey.

Regions can be put inside each other:

The University Parks is a region. The Public Area is in the University Parks.

but they are not allowed to overlap other than by one being entirely inside the other.

* See Improving the index map for ways to adjust the way the index map is drawn or exported for publication

arrow-up.png Start of Chapter 3: Things
arrow-left.png Back to §3.3. One-way connections
arrow-right.png Onward to §3.5. Kinds

*ExamplePort Royal 3
Division of Port Royal into regions.