There shouldn’t be a need for it to work on a viable exit. For instance:
You're in a small room with one exit, to the south. An odd thrumming sound
can be heard coming from nowhere in particular.
> EXAMINE EAST
You can hear the thrumming sound resonating through the wall.
> EXAMINE WEST
The thrumming sound is quite strong here. Looking closer, you can
barely make out the outline of a small access panel concealed by decades
of dirt and grime.
>
IMO it’s unwise to assume that players know that they can do this; you’d need to explicitly emphasize it in ABOUT/HELP if you need to put criticial information in there.
This should be implemented also for LISTEN, for implementing a well-known method of finding noisy things (whose, being also a mil/Nav historian, is known to me as “marching/Sailing toward the sound of guns”) whose, AFAICT was never implemented in IF
(actually, even being deaf, I manage to find umpteen times my late mother’s lost cell phone simply… calling it and following the ringing !)
Listening to something is implemented but usually just says something like “You hear nothing unusual.” You can take advantage of that. See the Recipe Book 3:8.
All of these cases can be handled by the author. The problem is that authors never think of handling them, so players never bother trying them, so authors never think of handling them. EXAMINE DIRECTION has been de facto outside the IF concensus since the early days.
(It’s not like “You can’t go that way” messages. Players reliably bump into those, so authors habitually customize them with good info.)
Arguably the library default should be even more discouraging. “Unhelpful” or some such. That’s terse, but it’s consistent with all of “You can’t do that”, “you can’t see anything”, and “you can see stuff that’s already been mentioned in the room description”.
I suppose if the description were “Looking to the north you see…” or “If you look north you can see…” someone might type LOOK NORTH. I can’t imagine anyone ever typing EXAMINE NORTH!
Trinity implements “LOOK direction”, allowing each room to define which objects you see trough SEE-N, SEE-S, etc. properties, as well as SEE-ALL for looking left and right. See PRE-DUMB-EXAMINE, which is otherwise mainly used to discourage “LOOK object”, for details. But I don’t think it even occurred to me to use that when I was first playing the game.
That’s one of the things I found fascinating about the leaked Infocom source code: Some early games implement commands that must have seemed like good ideas at the time, but which were dropped in later games.
E.g. in Zork I, you can ask questions like “IS THE LEAFLET IN THE MAILBOX” and the game will give you a sensible response.
No idea. Either way, it seems to have been abandoned pretty quickly. (In Starcross, it appears to only work with objects you are carrying, making it even less useful.)
Perhaps it was meant to give the impression that you were having a friendly conversation with to the parser, rather than using it to control the game? If so, Seastalker may be another example since it lets you use “GIVE ME THE object” instead of “TAKE object”.
I think it makes sense to use in certain locations, like lookout points where you first give a vague description of the surroundings. To give a response, you could throw in a before routine for the location with something like:
Examine:
if(selected_direction == n_to)
"You see some smoke rising up from somewhere in the forest.";
Except for a few limited cases, I think it’s a bad idea. If a player stumbles across it, then they will feel compelled to look in every direction in every room. As there’s up to twelve directions in every room, that’s a lot of unnecessary looking.
To answer the original question, it is difficult to implement it in a generic way so that it only works with valid exits, as exits may return a door or a string or a routine. These cases are difficult (though not impossible) to handle.