Doors can be traversed in darkness?

Related to some experiments with light and doors, given the following:

"Non-Glowing Door"

Room 1 is a dark room.

A door called a non-glowing door is east of Room 1. [note: not lit]

Room 2 is a dark room. It is east of the non-glowing door. 

Test me with "x door / open door / go east / x door / close door".

The test me looks like:

>test me
(Testing.)

>[1] x door
You can't see any such thing.

>[2] open door
You can't see any such thing.

>[3] go east
(first opening the non-glowing door)
You can't, since the non-glowing door leads nowhere.

>[4] x door
You can't see any such thing.

>[5] close door
You can't see any such thing.

Is it expected behavior to be able to traverse a door in the dark? Shouldn’t scope considerations affect automatic door manipulation?

1 Like

Shouldn’t that be:

Room 2 is a dark room. It is east of the non-glowing door.

With that change, the player encounters the issue you described. He is able to open and go through the door he can’t see.

>test me
(Testing.)

>[1] x door
You can't see any such thing.

>[2] open door
You can't see any such thing.

>[3] go east
(first opening the non-glowing door)

Darkness
It is pitch dark, and you can't see a thing.

>[4] x door
You can't see any such thing.

>[5] close door
You can't see any such thing.

Edit: The issue is “the can’t go through closed doors rule” (going action) just tries to open the door. The opening action only checks that the door is openable.

Most definitely! A copy-paste error – thanks, fixed above.

Yes. That seems out-of-sync with the handling of undescribed doors.

I always thought you wanted the player to be able to back out of a grue-infested cave. The dark room won’t by default tell them about exits (unless you’re using an exit lister that doesn’t account for darkness) and they must remember which way they came from.

Also, if they entered through a door it should remain open and not block retreat - unless the game automatically closes doors behind the player.

I had this problem using Easy Doors which don’t use a direction and require the player to name the door they want to Enter. Since it wasn’t a direction, I had to do tricks to put doors and light-switches in scope and make a FEEL AROUND command so the player could search for an exit from a dark room.

2 Likes

This does rather look like a scope oversight. Are there any other examples of “first doing something” that might be similarly affected.

But @HanonO has a point (apart from caves not usually having doors), since if you have dark room, no light and an open door. Then you close it. Presumably you would be completely trapped ?

Here, I think, the main problem is that the door is not visible if you try to examine it, or even open or close it, but you can suddenly open it if you walk in the direction of the door. The going action has a check rule to prevent going through undescribed doors, but not one that checks that the door is visible.

Certainly, the player should be able to go in directions not blocked by doors in darkness. I also agree that the player should be able to go through any door they went through to get to the dark place.

This seems to fix it:

Check an actor going (this is the can't go through unseen doors rule):
	if the door gone through is not nothing and ((the door gone through is not visible and the door gone through is closed) or the door gone through is undescribed):
		if the actor is the player:
			say "[We] [can't go] that way." (A);
		stop the action.

The can't go through unseen doors rule is listed instead of the can't go through undescribed doors rule in the check going rules.

Seems like an improvement to me!

Unseen Doors
"Unseen Doors"

The player carries a device called a flashlight. Understand "light" as the flashlight.

Every turn:
	if the flashlight is switched off:
		now the flashlight is not lit;
	if the flashlight is switched on:
		now the flashlight is lit.

Room 1 is a dark room.

Every turn when the location is Room 1:
	say "The gritty floor crunches beneath your boots."

A door called a non-glowing door is east of Room 1. [note: not lit]

Room 2 is a dark room. It is east of the non-glowing door. 

Every turn when the location is Room 2:
	say "Utter silence prevails here."

A door called a charcoal-black door is east of Room 2.

Room 3 is a dark room. It is east of the charcoal-black door. 

Every turn when the location is Room 3:
	say "The only sound is that of your own breathing."

Test me with "x door / open door / go east / turn on flashlight / x door / open door / turn off flashlight / e / w / e / e".

Check an actor going (this is the can't go through unseen doors rule):
	if the door gone through is not nothing and ((the door gone through is not visible and the door gone through is closed) or the door gone through is undescribed):
		if the actor is the player:
			say "[We] [can't go] that way." (A);
		stop the action.

The can't go through unseen doors rule is listed instead of the can't go through undescribed doors rule in the check going rules.

yields a transcript that addresses HanonO’s point:

Darkness
It is pitch dark, and you can't see a thing.

>test me
(Testing.)

>[1] x door
You can't see any such thing.

>[2] open door
You can't see any such thing.

>[3] go east
You can't go that way.

The gritty floor crunches beneath your boots.

>[4] turn on flashlight
You switch the flashlight on.

The gritty floor crunches beneath your boots.

Room 1
You can see a non-glowing door here.

>[5] x door
You see nothing special about the non-glowing door.

The gritty floor crunches beneath your boots.

>[6] open door
You open the non-glowing door.

The gritty floor crunches beneath your boots.

>[7] turn off flashlight
You switch the flashlight off.

The gritty floor crunches beneath your boots.

It is now pitch dark in here!

>[8] e

Darkness
It is pitch dark, and you can't see a thing.

Utter silence prevails here.

>[9] w

Darkness
It is pitch dark, and you can't see a thing.

The gritty floor crunches beneath your boots.

>[10] e

Darkness
It is pitch dark, and you can't see a thing.

Utter silence prevails here.

>[11] e
You can't go that way.

Utter silence prevails here.

(Without A_J_Mako’s code, command #11 would traverse a second door to a third room.)

Anything beyond that would seem to require modeling PC knowledge about the presence of doors.