Does INVENTORY work?
Can I drop an item I am carrying?
Put an item in a container I am carrying?
Remove an item from a container I am carrying?
Open/close/lock/unlock a container I am carrying?
Can I turn on a torch I am carrying?
Can I examine an object (by feel, smell, etc.)?
Talk to an NPC
Iâve encountered all sorts of combinations of the situations you describe. Personally, I would say âyesâ to all of your examples. Iâve often felt cheated when a game forces me to for example turn on my flashlight before going into a cave.
EXAMINE would, as you suggest, need to be handled differently, by redirecting it to FEEL, LISTEN, SMELL, TASTE.
I particularly liked instances where I could explore my surroundings by using FEEL/TOUCH (walls, ceiling,âŚ) or LISTEN (to sounds coming from adjacent rooms, or to the echo of a sound you make yourself).
That said, many games severely restrict the possible actions up to the point where none of your examples work, implying the PC is helpless without sight. Iâd say the convention in oldschool games has been to deny almost all actions when in darkness, but that this restriction is not so strong nowadays.
As the author you always know best. What does your game need?
I believe there are two schools of thought on using dark/light contrast:
As a gate - ie, you canât enter the darkened room or space unless you have a working light, thus âlocking offâ the area until a puzzle is solved/obstacle is surmounted
As environment - if the room/space is permanently dark, this enhances the other senses (hearing, smell, etc). Or if the room/space can be in both conditions (lit AND darkened) then dark mode adds a different ambiance to the same map location.
Or, of course, you can use both of the above at the same time
well, in the case of the container, if the container is familiar (as the old, trusted adventurerâs rucksack the PC own and use since time immemorialâŚ) surely the PC can open and close without visual clues. The other senses are instintively more relied on in the darkness (hence sounds are more perceived in dark conditions)
Talking to NPC, this is not only feasible, but also offer a broad range of solutions (or problemsâŚ) for the darkened situation, from the obvious (> PARD, SWITCH ON LIGHTâŚ) to the uniquely low cunning (cit.)
turning a torch in UK or a flashlight in US is feasible, an adventurer always knowing his/her tool of trade (and practically every torch in UK and flashlight in US have tactile feedback on the buttonâŚ) but I doubt that is easy to light, say, the brass carbide lantern every True Advenyurer venerateâŚ
so, having The Darkness at the left of the status line often isnât actually an issue for adventurer, aside, well, grues and nasty falls.
(Of course, Iâm not saying that Informâs approach is necessarily the best one, but since it is widely used, itâs good to consider what its defaults are.)
Does INVENTORY work? Yes
Can I drop an item I am carrying? Yes (itâll become inaccessible then)
Put an item in a container I am carrying? Yes (carried items only)
Remove an item from a container I am carrying? Yes
Open/close/lock/unlock a container I am carrying? Yes
Can I turn on a torch I am carrying? Yes
Can I examine an object (by feel, smell, etc.)? Only what youâre carrying (or wearing), and only with verbs other than EXAMINE (itâs in scope for examining, too, but the response is âIt is pitch dark, and you canât see a thing.â).
Talk to an NPC? No
So basically everything thatâs not carried or worn by the PC is completely inaccessible in darkness, meaning that you canât examine it and also canât touch it.
The maybe slightly unfortunate consequence is that if the player drops something, it canât be picked up or âfelt forâ again, even though the PC clearly knows about it and could probably find it in a small radius on the ground. And physically, the PC could of course also try to touch other known objects, and try to talk to NPCs.
I think itâs intended as a reasonable baseline default implementation, and if the author wants darkness to play a special role in the game, then some customization will likely be necessary anyway.
(Expand to show a small example which demonstrates Inform's behaviour:)
The Lab is a dark room.
Alice is a woman in the lab.
[Won't work in the dark:]
Instead of telling Alice about something:
say "'Alice, I think our new see-in-the-dark potion isn't working.'[paragraph break]She sighs. 'I know, it seems we messed up the formula again.'";
The table is a supporter in the lab.
The player wears a lab coat.
The player carries a widget.
The player carries a torch. The torch is a device.
Carry out switching on the torch:
now the torch is lit.
Carry out switching off the torch:
now the torch is not lit.
The player carries a box. The box is a locked container.
The player carries a small key. The small key unlocks the box.
The apple is in the box. The apple is edible.
Test me with "x table / x alice / tell alice about darkness / i / feel widget / drop widget / feel widget / take off coat / unlock box with key / open box / take apple / put apple in box / eat apple / close box / lock it with key / turn on torch / tell alice about darkness".
Heh, well, as as has been described, there hasnât been one built into Inform. But anyone who thinks of the problem and doesnât like it will either build their own solution or use a pre-rolled one.
In the Inform case, Aaron Reedâs extension âSmall Kindnessessâ adds the ability to switch on a light-giving object you dropped (in the current room, in the dark). So if your torch was off and you dropped it, you could turn it on even though itâs on the floor and usually not seeable at this point, which would then save you. But thatâs still a pretty conservative interpretation of making the situation âsafeâ. At least it gives an idea of how to program it.
It does look back to whatâs been said, that your use of darkness in your game will inform what behaviour you want in that dark.
One thing not in the list: in Inform you can move in the dark by compass direction, although without the room descriptions visible, the player may not know which way to go. If you move north into a dark room, the player can retreat south back into the light.
Two thinkings about darknes:
Some games let you move around in the dark as if you had light on, ex. Anchorhead into the Basilic.
Another example Darkun:
In the vaulted crypt you can climb down till end of the rope and jump down afterwards, you can wander around in the dark and you can touch a cilinder that becomes a oil can. In the maze you cant read the map but you can stroll all the map around, but you cant enter the cavern seaside without the lit lamp.
Finally you can enter wine cellar in the dark, touch walls but nothing more.
Another I7 darkness idiosyncrasy: For NPCs the contents of the room are in scope as if it were lit. So if we add a little to @StJohnLimboâs example and change the carry out rules to accommodate NPCs:
After deciding the scope of the player when in darkness:
if the location encloses Alice, place Alice in scope.
Persuasion rule for asking Alice to try doing something: persuasion succeeds.
Carry out an actor switching on the torch:
now the torch is lit.
Carry out an actor switching off the torch:
now the torch is not lit.
then this is possible:
Darkness
It is pitch dark, and you can't see a thing.
>alice, turn on torch
Alice switches the torch on.
Lab
You can see Alice and a table here.
(This also works if the torch was on the table and there was no sensible way the player knew it existed.)
Only after performing an INVENTORY with a light source available.
Starting in the dark, the parser reports âYou are empty-handedâ even if youâre carrying items. Turn on a light, perform an inventory, turn off the light, and a complete inventory is listed. None of the items may be examined without light, however (âItâs too dark to do thatâ).
Yes, and it becomes inaccessible.
Yes, if carrying the item. The item then becomes inaccessible, even if the container is listed/known.
No, for reasons explained above.
Yes to all.
Yes.
If not held or in a container, âYou see no X here.â If held, âItâs too dark to do that.â
For not held and contained objects, smell returns âYou are not aware of any X here,â otherwise, âYou smell nothing out of the ordinaryâ (default response). Adding a smell description returns that instead.
No, not even after turning a light source on and off.
For TADS, the response is the same as trying to speak to the actor, namely, âYou see no alice here.â
Iâve always thought that having locations either âlightâ or âdarkâ was mostly bogus.
What youâre really talking about is being able to manipulate âreferential scopeâ. This is the set of things you can reference.
So typically, in a âlitâ room, referential scope is; all things inside the thing you are in, recursively.
And in a âdarkâ room, referential scope is; all things inside you recursively.
The term âinsideâ here used somewhat vaguely. In practice it includes âinâ and âonâ and other relativisers.
You furthermore have the wrinkles of things in closed containers and transparent containers.
So what you really want to be able to do, is have the story control the referential scope seeds. eg âthe thing(s) youâre inâ, or âyouâ, respectively in the classic cases of âlightâ and âdarkâ.
Now, you can manually control scope, you can also deal with things like views of things through a window in adjacent locations, and stuff like âmagic portalsâ.
Presumably, you can also handle âa bit darkâ rooms and âmostly dark roomsâ, the same way. eg âmostly darkâ seed = set of large things in the current location + self.