Say you wanted to implement a hollow in some hills; a depression where the land all around it is the hills surrounding it.
It makes logical sense that all possible directions could reasonably be going ‘up’ from the hollow, as you’d have to climb the hills to get anywhere else.
I can think of no way to accomplish this. Is it even possible?
While it IS hypothetical to a degree more or less, I do kinda have a room in my game map where that would make sense.
For now, I’ve simply decided to use only one ‘up’ and leave the other direction that COULD be ‘up’ as just NE.
What do you want to happen if the player types UP?
Go to any of the adjoining locations that are up the hills.
I suppose a complicated disambiguation could be done … but I’ve no idea how. Nor do I think it would really be worth it for just a single room where this occurs.
I dunno. It’s mostly just hypothetical really at this point. Altho I can imagine perhaps wanting to do something like this in the future. I’ve personally not played any games where this happens.
I suppose the best route would be to build the map such that this doesn’t happen.
Yeah, it’d be a little bit of work but definitely doable – I haven’t used them, but I know there are extensions that allow you to ask the player a question that is more complex than the yes/no ones you can get with “if the player consents” which you could use for the disambiguation (Questions by Michael Callaghan is one I’ve heard folks mention). But it seems like it would just be confusing to the player, both to hold in their head and to actually navigate via the parser – seems much easier to say one direction is up, and then if relative elevation is important say something like “An upward slope to the northeast leads to…”
I’ve not done something exactly like what you’re saying here and the suggestion that @DeusIrae had on saying “An upward slope to the northeast leads to…” is a good way to go I think. However, something else you may consider is if you going up could lead you to a random room that would make sense in the context.
A room can be an up-room. Hill1 is a room. Hill1 is an up-room. Hill2 is a room. Hill2 is an up-room. Hill3 is a room. Hill3 is an up-room. Hollow is a room. The player is in the hollow. Instead of going up when the location is the Hollow: now the player is in a random up-room.
Perhaps that isn’t the intent, but I did something similar in one of my WIP where I needed the PC to move to a random room out of a subset of special rooms.
The round room in Zork famously uses this “dump the player in a random room” strategy. Interestingly, the round room in the Department of Mysteries in Harry Potter and the Order of the Phoenix works exactly the same way, adding only the visual detail that the walls visibly spin when you reenter the room. As always, though, this needs a warning attached: many IF players today have a low tolerance for puzzles that mess with the navigation system. If getting lost in the hills isn’t meant to be a major part of the story, it might be better to gently direct the player in a particular upward direction, as @DeusIrae suggests.
There’s an example in WI§13.11 that demonstrates defining an alternative relationship between rooms, and using that to determine a “path” of sorts.
By itself, this doesn’t actually allow ordinary map navigation, but something similar could be used to help determine what the player means. (Much like how
exit tries to guess what they’re trying to exit from.) You’re always going to have a bit of trouble if there’s some ambiguity, though.
An example that does extend this to navigation is A Haughty Spirit, which demonstrates using a similar relation to control how
enter window behaves.
The ordinary Inform world model doesn’t allow more than one door or room in any given direction. (It is possible to add extra directions, but that’s not for the faint of heart.) Anything else will require extending the system with something that moves the player via other means.
You can sometimes work around this if there’s only a limited amount – for example, you could describe a green door and yellow door as both being in the south wall, and yet actually set them as southwest and southeast – assuming that you intend for the player to always
go green door then they don’t need to be told (or care) which internal direction that actually was. This can be confusing if not used carefully, however – combination with exit-listing extensions is tricky, as is what happens if they do want to examine or go in one of the southerly directions.
In the specific case of the “everywhere is up” hollow, the simplest solution is to not define anywhere as up – require the player to be specific about which way they meant.
Otherwise you can pick one way to be the “most up” and let both the “real” direction and “up” go that way.
Or if you wanted to be fancy, you could remember which way the player came from (or alternatively, their most recent use of “down”) and make “up” dynamically map to that. But this is perhaps more confusing than helpful.
Honestly, I’d go with a simple solution:
Instead of going up when the location is the Hollow: say "From here, every direction is 'up'; you'll need to be more specific."