§7.13. Going from, going to

Going is an action defined like any other: it is the one which happens when the player tries to go from one location to another. But it is unlike other actions because it happens in two locations, not just one, and has other complications such as vehicles and doors to contend with. To make it easier to write legible and flexible rules, "going" is allowed to be described in a number of special ways not open to other actions, as demonstrated by the following example game:

paste.png "Going Going"

The Catalogue Room is east of the Front Stacks. South of the Catalogue Room is the Musicology Section.

Instead of going nowhere from the Front Stacks, say "Bookcases obstruct almost all passages out of here."

Instead of going nowhere, say "You really can't wander around at random in the Library."

Before going to the Catalogue Room, say "You emerge back into the Catalogue Room."

Note that "going nowhere" means trying a map connection which is blank, and if no rules intervene then "You can't go that way" is normally printed. Unless "nowhere" is specified, descriptions of going apply only when there is a map connection. So "going from the Musicology Section" would not match if the player were trying to go east from there, since there is no map connection to the east. Similarly, "going somewhere" excludes blank connections.

The places gone "from" or "to" can be specific named regions instead of rooms. This is convenient when there are several different ways into or out of an area of map but a common rule needs to apply to all: so, for example,

Before going from the Cultivated Land to the Wilderness, ...
Before going nowhere from the Wilderness, say "Tangled brush forces you back."

Note that it must be "going nowhere from the Wilderness", not "...in the Wilderness". (Note also the caveat that the regions must be named: "going from a region", or something similarly nonspecific, will not work.)

An important point about "going... from" is that, as mentioned in general terms above, it requires that there is actually a map connection that way: whereas "going... in" does not. Suppose there is no map connection north from the Wilderness. Then:

Instead of going north from the Wilderness, say "You'll never read this."
Instead of going north in the Wilderness, say "Oh, it's too cold."

The first of these never happens, because it is logically impossible to go north from the Wilderness: but the second does happen. (Technically, this is because "going north" is the action, and "in the Wilderness" a separate condition tacked onto the rule.) This distinction is often useful - it allows us to write rules which apply only to feasible movements.

This may be a good place to mention a small restriction on the ways we can specify an action for a rule to apply to, and how it can be overcome. The restriction is that the action should only involve constant quantities, so that the following does not work:

The Dome is a room. The Hutch is north of the Dome. The rabbit is in the Hutch. Before going to the location of the rabbit, say "You pick up a scent!"

because "the location of the rabbit" is a quantity which changes in play (the player can pick up the rabbit and take him to the Dome, for instance). However, we can get around this restriction by defining a suitable adjective, like so:

The Dome is a room. The Hutch is north of the Dome. The rabbit is in the Hutch. Definition: a room is rabbit-infested if it is the location of the rabbit. Before going to a rabbit-infested room, say "You pick up a scent!"


arrow-up.pngStart of Chapter 7: Basic Actions
arrow-left.pngBack to §7.12. In the presence of, and when
arrow-right.pngOnward to §7.14. Going by, going through, going with

*ExampleVeronica
An effect that occurs only when the player leaves a region entirely.

**ExampleA&E
Using regions to block access to an entire area when the player does not carry a pass, regardless of which entrance he uses.

The main trick of this is always to record where the player has gone when he has just moved.

paste.png "Polarity"

The former location is a room that varies.

Here we record where the player has been before moving him; by calling this the "first carry out going rule", we make sure that this rule is followed during the going action before any other pieces of the movement occur. For more detail, see the chapters on advanced actions and on rules.

First carry out going rule:
    now the former location is the location.

Understand "go back" as retreating. Understand "back" or "return" or "retreat" as retreating.

Retreating is an action applying to nothing.

Carry out retreating:
    let way be the best route from the location to the former location, using doors;
    if way is a direction, try going way;
    otherwise say "You can't see an open way back."

And to deal with the case where the player has not yet moved:

When play begins: now the former location is the Dome.

Instead of retreating when the former location is the location: say "You haven't gone anywhere yet."

Dome is a room. North of Dome is North Chapel. South of the Dome is South Chapel. West of the Dome is Western End. Quiet Corner is northwest of the Dome, north of Western End, and west of North Chapel. Loud Corner is east of North Chapel, northeast of Dome, and north of Eastern End. Eastern End is north of Dim Corner and east of Dome. Dim Corner is southeast of Dome and east of South Chapel. Ruined Corner is southwest of Dome, west of South Chapel, and south of Western End.

The church door is east of Eastern End and west of the Courtyard. The church door is a door.

Test me with "back / n / go back / e / open door / go through door / go back".

***ExamplePolarity
A "go back" command that keeps track of the direction from which the player came, and sends him back.

The main trick of this is always to record where the player has gone when he has just moved.

paste.png "Polarity"

The former location is a room that varies.

Here we record where the player has been before moving him; by calling this the "first carry out going rule", we make sure that this rule is followed during the going action before any other pieces of the movement occur. For more detail, see the chapters on advanced actions and on rules.

First carry out going rule:
    now the former location is the location.

Understand "go back" as retreating. Understand "back" or "return" or "retreat" as retreating.

Retreating is an action applying to nothing.

Carry out retreating:
    let way be the best route from the location to the former location, using doors;
    if way is a direction, try going way;
    otherwise say "You can't see an open way back."

And to deal with the case where the player has not yet moved:

When play begins: now the former location is the Dome.

Instead of retreating when the former location is the location: say "You haven't gone anywhere yet."

Dome is a room. North of Dome is North Chapel. South of the Dome is South Chapel. West of the Dome is Western End. Quiet Corner is northwest of the Dome, north of Western End, and west of North Chapel. Loud Corner is east of North Chapel, northeast of Dome, and north of Eastern End. Eastern End is north of Dim Corner and east of Dome. Dim Corner is southeast of Dome and east of South Chapel. Ruined Corner is southwest of Dome, west of South Chapel, and south of Western End.

The church door is east of Eastern End and west of the Courtyard. The church door is a door.

Test me with "back / n / go back / e / open door / go through door / go back".

The main trick of this is always to record where the player has gone when he has just moved.

paste.png "Polarity"

The former location is a room that varies.

Here we record where the player has been before moving him; by calling this the "first carry out going rule", we make sure that this rule is followed during the going action before any other pieces of the movement occur. For more detail, see the chapters on advanced actions and on rules.

First carry out going rule:
    now the former location is the location.

Understand "go back" as retreating. Understand "back" or "return" or "retreat" as retreating.

Retreating is an action applying to nothing.

Carry out retreating:
    let way be the best route from the location to the former location, using doors;
    if way is a direction, try going way;
    otherwise say "You can't see an open way back."

And to deal with the case where the player has not yet moved:

When play begins: now the former location is the Dome.

Instead of retreating when the former location is the location: say "You haven't gone anywhere yet."

Dome is a room. North of Dome is North Chapel. South of the Dome is South Chapel. West of the Dome is Western End. Quiet Corner is northwest of the Dome, north of Western End, and west of North Chapel. Loud Corner is east of North Chapel, northeast of Dome, and north of Eastern End. Eastern End is north of Dim Corner and east of Dome. Dim Corner is southeast of Dome and east of South Chapel. Ruined Corner is southwest of Dome, west of South Chapel, and south of Western End.

The church door is east of Eastern End and west of the Courtyard. The church door is a door.

Test me with "back / n / go back / e / open door / go through door / go back".

***ExampleBumping into Walls
Offering the player a list of valid directions if he tries to go in a direction that leads nowhere.