Inside/Outside vs Compass Directions

Hi All,

My map is using compass directions (the usual suspects), but I also want to allow for directions like inside/outside as well, especially for rooms with a single door leading into them. Now I can think of several ways of handling this, but I am a bit at a loss on how to decide what would be most appropriate.

Consider the following trivial solution without doors:

Include Exit Lister by Eric Eve.
The Garden Path is a room. "You are at the end of the garden path. The garden shed is to the north."
The Garden Shed is a room. "Various gardening tools are stored in here. The only exit is south."

The Garden Shed is north of the Garden Path.
The Garden Shed is inside of the Garden Path.

Now I cannot hook up a door in the same way, so I currently use some instead trickery and replace the last two lines with the following:

The Garden Shed is north of the Garden Path.
The Shed Door is a scenery door.
The Shed Door is inside of the Garden Path and outside of the Garden Shed.
Instead of an actor going north in the Garden Path, try the actor going inside.
Instead of an actor going south in the Garden Shed, try the actor going outside.

In this way, the player can use either go inside or go north to enter the Garden Shed.

Are there easier ways to do this? Of course I could drop either the inside/outside or north/south connection and then the door implementation is trivial. But I have no idea if this would confuse map makers.

Another option I am considering is to put the door on the north/south connection and use the Instead rules to map inside/outside to north/south:

The Garden Shed is inside of the Garden Path. [ optional ]
The Shed Door is a scenery door.
The Shed Door is north of the Garden Path and south of the Garden Shed.
Instead of an actor going inside in the Garden Path, try the actor going north.
Instead of an actor going outside in the Garden Shed, try the actor going south.

Then if there is no direct inside/outside connection, the Exit Lister would not report on them (less spammy), but the player would still be able to use the inside/outside directions.

Feedback is highly appreciated!

3 Likes


Stylistically: For me it depends on the game. These are two different ways I did it (Snowhaven vs Sentient Beings)

Technically, I don’t know anything about Inform, but to get around the limitations of Adventuron, I manually printed the exits and removed the exit lister.

Edit: only got my thoughts half down before one of my munchkins needed me

3 Likes

on the doors, in the i7 code above, there’s already TWO directions, both refering to two parallel passages, why not two doors, same two parallel passages, aside the possibility of that one of the two can be programmatically a fake passage pointing to the actual one ? That is, the result is what matter, the PC or NPC moves from the path to the shed, as Machiavelli will have noted, there’s an end, the issue lies in the mean, and the mean is technically possible, the issue, I recognise, lies in wording it for Inform…

Best regards from Italy,
dott. Piergiorgio.

1 Like

I’m pretty sure inform will flag that as an error at compile time.

1 Like

The proposed method seems ok, unless I’m missing something. Are you having a problem with the exit lister?

1 Like

I don’t think so, but this may be handy for your own organization:

a room has a direction called inside-direction. inside-direction of a room is usually inside.
a room has a direction called outside-direction. inside-direction of a room is usually outside.

check going inside when inside-direction of location of player is not inside:
    try going inside-direction of location of player instead;
check going outside when outside-direction of location of player is not outside:
    try going outside-direction of location of player instead;

This may work with doors, too. I don’t know. I don’t use doors much, so you might want to create a sandbox project to try it out.

If you go with “room 1 is inside of room 2. room 1 is north of room 2.” I also think it would be possible to tweak the Exit Lister in any case to say:

say "[list of exitable directions].";

Where we could extend the list of exitable directions if two go to the same place, or get rid of inside/outside if they go north or south. It seems like a neat programming project.

2 Likes

Gotta say those two lines are pretty darn easy.

4 Likes

Andrew,

I get what you are trying to say. But it is easy to get tripped up on this kind of thing. I originally had:

The Garden Shed is north of the Garden Path.
The Shed Door is a scenery door.
The Shed Door is inside of the Garden Path and outside of the Garden Shed.
Instead of going north in the Garden Path, try going inside.
Instead of going south in the Garden Shed, try going outside.

And of course wandering NPCs blissfully ignored any locked doors and just walked around them using the author-provided alternate routes.

And then there is the lingering doubt about path finding. That would definitely ignore any instead rules and use any alternate paths for its calculations (it would pick a shorter route through a locked door, even if there is a longer route without locked doors available).

Also, there are a few door-related extensions around, so I was wondering maybe I was trying to solve something which has been solved years ago.

1 Like

Ah, what you’ll want to do there is remove the “is north of” line. You don’t need it if the Instead rules are meant to cover that case.

You may also want to make the Instead rules apply to “an actor”, which also applies them to NPCs; this won’t affect pathfinding, but will make a difference if someone says BOB, GO NORTH.

2 Likes

Hi all,

Thank you all for your feedback. I have to conclude I was maybe making things too complex for myself. In the end I just want to be able to ‘go inside’ when at the entrance of a building. Especially when considering map making, compass directions probably work out best. Then I do not need double connections or worry about pathfinding:

The Shed Door is a scenery door.
The Shed Door is north of the Garden Path and south of the Garden Shed.
Instead of an actor going inside in the Garden Path, try the actor going north.
Instead of an actor going outside in the Garden Shed, try the actor going south.

The only downside is that INSIDE/OUTSIDE do not show up in the exit lister. Small loss, I guess.

4 Likes

That can also be fixed, but it’ll require a little change to Exit Lister.

The question is, do you want it to be fixed? Listing the available exits as “you can go in or north” would make me think those lead to different places.

3 Likes

Good point there. Let us not confuse the poor player who has to suffer everything I am throwing at them. Having a smartass NPC following the player is quite enough :stuck_out_tongue: .

2 Likes