§7.13. Traveling Characters
There are a number of ways we can make characters navigate our map. We might reasonably want them to approach and follow the player (as in Van Helsing); or to allow the player to follow characters who have left the room (as in Actaeon).
Characters who are less interested in the player will more likely follow their own courses around the available geography, however. A character may move randomly from room to room, as demonstrated in Mistress of Animals; he may follow a path that we have specifically written in advance, as Odyssey shows; or, most elegantly, he may use the "best route" calculation to find the best possible way to a given target room, as seen in Latris Theon.
This final method is arguably the neatest solution to character movement, allowing for characters to act in sophisticated ways; if we incorporate the Locksmith extension, other characters will even unlock and open doors that are in their way. The chief catch is that it should not be used too profligately with large numbers of characters, since on slow machines the processing power required to plan all their travel will make a noticeable difference to the running speed of the story.
All the same, the constraints are not so severe as to preclude having a moderate number of route-finding characters all wandering around at once. This does introduce a new problem, however: movement descriptions can become hard to follow if every turn produces long reams of reports such as
Joe enters the room from the south.
Lawrence opens the gate.
Lawrence departs to the west.
Lucy comes in from above.
Ted enters the room from the south.
Bill departs to the west.
Patient Zero tackles this problem by calculating all of the character movement without printing any text; it then combines similar or related events into coherent paragraphs, as in
Rhoda and Antony walk into the Post Office. Rhoda could have been rolling in chocolate and Antony looks as though dipped in french vanilla.
or
Antony opens the iron gate. He goes through.
See Doors, Staircases, and Bridges for some technical details of allowing other characters to interact with doors when they're in rooms that don't contain the player
![]() | Start of Chapter 7: Other Characters |
![]() | Back to §7.12. Characters Following a Script |
![]() | Onward to §7.14. Obedient Characters |
Suppose we want a restless sort of character always pacing from room to room. It is quite easy to use adjacency to achieve this effect:
Of course, it helps that Artemis is the sort to like open spaces. The implementation would become more complicated if there were doors which might block transit between these locations. |
|
Suppose we want a restless sort of character always pacing from room to room. It is quite easy to use adjacency to achieve this effect:
Of course, it helps that Artemis is the sort to like open spaces. The implementation would become more complicated if there were doors which might block transit between these locations. |
|
|
|
|
|