CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.33k stars 4.14k forks source link

A lighting is decreasing the illumination (cell phone problem). #45670

Closed 0x9conc1 closed 1 year ago

0x9conc1 commented 3 years ago

Indoor ~visibility~ illumination is reduced when the phone light is on.

Steps To Reproduce: in a dark room, compare visibility and visibility with the phone turned on, or:

  1. Upload the attached save file and jump in.
  2. Turn on the phone light.

    Versions and configuration

    • OS: Windows
    • OS Version: MINGW/CYGWIN/MSYS2 on unknown Windows version (upd: Windows 7 64-bit)
    • Game Version: 0.E-7804-g98d7868 [64-bit] (upd: buld 11184)
    • Graphics Version: Tiles
    • Game Language: Системный язык [ ] (upd: Russian)
    • Mods loaded: [ Тёмные Дни Впереди [dda] [speed for dexterity] [characteristics for skills] ]

      Additionally

      Works on buld 11192. Lol, works on E.0-2, - really nobody noticed this?

(I assume that this is illumination because, for example, an electrified zombie would be visible in the distance, or the screen of a working terminal, etc. otherwise I do not understand what is the visibility function that makes it work like this; or maybe it's some kind of local visibility)

Maybe connected: https://github.com/CleverRaven/Cataclysm-DDA/issues/44693, https://github.com/CleverRaven/Cataclysm-DDA/issues/44845.

Update

https://github.com/CleverRaven/Cataclysm-DDA/issues/45670#issuecomment-735277934 --> https://github.com/CleverRaven/Cataclysm-DDA/issues/45670#issuecomment-735289856 <-- To sum up: the cell phone has weak lighting. Visibility disappears, although it should not have (probably because the terminal's effect, which is discussed in the discussion, works, but there should not be this effect and if it should be, then after turning off the light, for a short time - while getting used to the changed lighting). Possible incorrect interaction with the character's perception.

No one noticed, including me, that there was light from the phone screen. however most of the arguments remain relevant to the topic, so

Expected behavior

No terminal effect

Decision

Make the terminal effect only for a short period of time after turning off the telephone light, removing its imitation while the light is on, which right now looks like the effect of the terminal when you are near it (right now it is like as if we were looking at the phone and then looking around, being blinded). or just remove the terminal effect reducing visibility

wapcaplet commented 3 years ago

I guess you are referring to this effect, where having a light decreases your overall sight radius. No light (left) versus cell phone light (right): image

I believe this is a normal and intended effect, simulating how a bright light in the darkness will reduce your night vision.

0x9conc1 commented 3 years ago

@wapcaplet I don't quite understand why light should reduce night vision: the radius of visibility should not change at all, because the eyes is responsible for this, which is constant as long as the character is healthy, but the lighting should make objects in the radius of visibility lit and distinguishable from other darkness, in the same radius of visibility.

ZhilkinSerg commented 3 years ago

Your eyes adapt to bright light and you start to see worse in dim light and darkness.

0x9conc1 commented 3 years ago

@ZhilkinSerg What bright light are you talking about? About cell phone light? We do not blind our eyes, or the light is not so bright as to be reflected from surfaces and dazzle in us, reducing visibility, like the effect of white snow; in addition, even to the bright light from snow in real life, we gradually adapt and look at it without squinting; besides, even if the light were very bright, I still would not understand what effect you are talking about. Rright yesterday, when I was writing this post, it was dark in my room, I drew up the curtains and it became almost impossible to see anything, only rare outlines of objects near and far, then I experimented with a flashlight from the phone, and, of course, the effect, oh which you say I have not found.

Well, imagine that you are standing in complete darkness - nothing is visible at all. Behind, far from you, a light began to burn, shining through your back, and in front you saw the outlines of a person, and if you step back even one step, you will no longer see him (you block the light from behind). Ok, you stand still, turn on the flashlight - and it disappears?!?!!?!? Or a more obvious example with a wall, the wall in front of you would just evaporate ??? Obviously, if such an effect existed, most likely, they would give it a name, it would be known to many people, and moms and dads would teach their children: do not turn on the light in the evening - you will see less, or something like: when you will run in the evening with a flashlight, don't run too hard, otherwise you won't notice how the wall will appear in front of you, although if the flashlight were turned off, he would see the wall?!?!

ZhilkinSerg commented 3 years ago

@ZhilkinSerg What bright light are you talking about? About cell phone light? We do not blind our eyes, or the light is not so bright as to be reflected from surfaces and dazzle in us, reducing visibility, like the effect of white snow; in addition, even to the bright light from snow in real life, we gradually adapt and look at it without squinting; besides, even if the light were very bright, I still would not understand what effect you are talking about. right yesterday, when I was writing this post, it was dark in my room, I drew up the curtains and it became almost impossible to see anything, only rare outlines of objects near and far, then I experimented with a flashlight from the phone, and, of course, the effect, oh which you say I have not found.

Well, imagine that you are standing in complete darkness - nothing is visible at all. Behind, far from you, a light began to burn, shining through your back, and in front you saw the outlines of a person, and if you step back even one step, you will no longer see him. Ok, you stand still, turn on the flashlight - and it disappears?!? !!?!? Or a more obvious example with a wall, the wall in front of you would just evaporate ??? Obviously, if such an effect existed, most likely, they would give it a name, it would be known to many people, and moms and dads would teach their children: do not turn on the light in the evening - you will see less, or something like: when you will run in the evening with a flashlight, don't run too hard, otherwise you won't notice how the wall will appear in front of you, although if the flashlight were turned off, he would see the wall?!?!

You need to learn what ocular adaptation is.

0x9conc1 commented 3 years ago

Sorry, I experimented yesterday in a dark apartment and didn't find anything like that

ZhilkinSerg commented 3 years ago

Go visit an ophthalmologist, I dunno.

0x9conc1 commented 3 years ago

@ZhilkinSerg Can you give an example of the manifestation of this effect, or, more precisely, I am asking what kind of experiment should be carried out in order to stop seeing objects when the light is turned on, which would have been visible before?

Update: I just thought that the original developer of the game, when thinking about ideas of realism in the game, found this effect and without further thought, inspired by what was found, included it in the game. And he, and now you, have not thought about the meaning of eye adaptation - when the eyes adapt to night illumination, this does not mean that they begin to see better than during the day. And, for example, when the eyes have fully adapted to the dark, turning on the light will only give a signal that it is not necessary to use large brain resources to obtain information with the help of the eyes - because the same objects that the eyes saw in the dark due to eye adaptation now made visible by light. !The same objects! (or even more)

emptytriangle commented 3 years ago

the effect is supposed to simulate the effect of not being able to see into a dimly-lit room when you are standing in sunlight, despite the fact that you would be able to see the contents of the room if you were standing in darkness.

An example of when it's supposed to take effect is when you are in darkness and you blast headlights into a group of zombies, then exit the rear of the car and sneak up from the side. The zombies will not be able to see you because they are blinded by the headlights. Or if you are looting the zombies inside the cone of the headlights, you would not be able to see a zombie approaching from the side in the darkness due to your being in the flood of light.

It doesn't work perfectly in all situations. For example, when standing next to a lit computer console you cannot see into the darkness despite the fact that your character hasn't necessarily been looking directly at the display. IRL you don't get blinded just from standing near a computer, you'd have to have been reading the display. But it does work more often than it doesn't because in CDDA if you're near the display you were probably there for a reason (using it to read by or looking at it).

44693 and #44845 seem to be unrelated to this issue

Zireael07 commented 3 years ago

Yep, and to add, you can make your night vision worse just by looking at a phone screen or using a flashlight (I can see pretty well at night, so paradoxically, using a flashlight is often more of a hindrance than help).

Other than personal anecdotes, there's this: https://en.wikipedia.org/wiki/Flash_blindness At night, the dark-adapted pupil is wide open so flash blindness has a greater effect and lasts longer.

I believe my eye at night is wide open because I see so well at night (you could say I have Night Vision or even Full Night Vision trait IRL) so I can tell you I get really dazzled/blinded from a flashlight or phone, even when not looking directly at it.

0x9conc1 commented 3 years ago

@emptytriangle , @Zireael07 Guys, I'm very glad of your activity on this topic, thanks! but still: we're talking about a ridiculously short distance of 2-3 steps from the character! and this is awful! Most likely (since I myself did not pay attention to it), this effect can worsen your perception of objects, for example, in the distance: imagine that we see some very dimly lit object in the distance and look at it for a long time, we gradually adapt and we can see its shape and shape better, and then we turned on the flashlight and look around, our eyes look at the illuminated objects and, perhaps, in this example, the object in the distance will really become worse visible, because the eyes, having received a signal from light to adjust from night vision, will perceive the shape of an object in the distance worse (worse than peak night vision which we came to during adaptation, but no worse (after de-adaptation from light, in 2-5 seconds which we can reach even when we have a light source turned on) the initial look at the object). Here we can cite as an example, say, snipers, or shooters in general, who, before aiming their eyes, with which they aim, are kept closed or behind a blindfold (when preparing to shoot at night or in the evening). But, again, these are damn short distances. Stand in a dark room and look around, and then turn on the light. Even a weak light (it doesn't matter if it's weak, medium or strong) source is enough to illuminate (more or less) everything within a radius of 10 meters, or even 15 and 20 meters, in complete darkness! And here there is no question of loss of visibility at such a distance - as I already wrote, all objects that we saw with night vision became illuminated, and therefore better visible, because they are illuminated ~because we switched to a more efficient algorithm for analyzing objects from better lighting, or rather, requiring a smaller pupil size to obtain information about the object (wich reducing the amount of light entering the retina so that she does not overwork from the superlight)~.

Right now, while writing this, I turned away from the bright monitor and I needed to adapt for 2-5 seconds to the dim room, and I began to see all objects, and then I turned on the light from the flashlight on my phone and began to see everything much better (and you seem to imagine every time that turning on the light is the same as glowing the monitor in your eyes, but after all, there is just a weak reflection of light from objects (which is better than night vision)).

so the situation in this image is just awful image

@emptytriangle , I think that what you are describing is possible, but if you continue to look in the direction of the expected location of the object, then you will see it (of course, if you don't squat, at the level of the headlights, so that they blind your eyes, ~but this is absurd, for example, not to get up every 10 seconds to look around (in zombie apocalypse))~

by the way, this effect, which you wrote about, created another asburdened situation: image image and I was thinking of writing another post about it (it's 5 a.m. and it's very dark everywhere)

0x9conc1 commented 3 years ago

and btw, visibility in the game generally works lousy: we should not see what is behind (you might say we're turning around, but still), in the dark we should see further and in general, see the whole room, but with the only difference that it is not lit. I mean, for example, go to a warehouse at night and shine a light there, and you will see, if you can't imagine now, that you will see the outlines of objects at least within 10 meters, faint but distinguishable, and what the game now looks more like a fog of war, associated, as in other games, with technical limitations, but now it is already 2013, at the time of the game's creation. Then it would be possible without the fog of war.or is it due to an underdeveloped noise system, lack of stealth skills and all that is difficult and long to implement, I assume (there is no noise on walking on a wooden floor, on snow, on glass, if it is not glass specially laid out by us, etc.) ((sorry, I am not familiar with how the noise system is developed, I can be wrong))

0x9conc1 commented 3 years ago

resume: all objects that we saw with night vision became illuminated, and therefore better visible, because they are illuminated (after deadaptation of the eyes for 2-10 seconds, I believe (the further in the dark the longer))

0x9conc1 commented 3 years ago

or/and(?), if on the other hand/btw(?), the game has a ridiculously small radius of illumination from a candle (although I didn't check with it) and from a cell or mobile phone.

this may be due to the fact that the light is not in the shape of a cone or in a more complex shape, but simply around; although it is possible that when creating the light, the developer did not think that the lighting around compensates for the lack of a cone - we simply do not have the direction of view, face, in the game.

poor us...

Zireael07 commented 3 years ago

@AnonimusC:

all objects that we saw with night vision became illuminated, and therefore better visible,

You assume our night vision range equals the flashlight/light source range. That is not necessarily the case, neither IRL nor in-game.

we simply do not have the direction of view, face, in the game.

We don't, and it's not planned (too much complexity - many literal corner cases - and too unituitive for the average player - I haven't seen a top-down 2D game that communicates view direction well)

0x9conc1 commented 3 years ago

@Zireael07 Yes, you're right, but I didn't conclude that. I'm talking about the case in the post.

I understand that you don't plan to. by the way, I saw this at project zomboid and at unreal world.

0x9conc1 commented 3 years ago

Okay, guys, due to the abundance of text, in order to save you time, I will try to make a shorter summary, I hope, an ultimatum, because you have no reason to disagree with him.

Describe the bug

  1. When you turn on the light source, the object in the visibility radius disappears, although this should not have happened, because since we saw the object, light emanated from it, and when we turned on our light, the light that came from the object did not go anywhere and we can see it. Perhaps someone will say that we have lost the ability to night vision of a poorly lit object, but this is not so: even with the light on, we can concentrate on that object and see it, partially remaining in night mode, because the light does not blind our eyes like this strong enough to block off any light from it, as the light from a street lamp in the form of a halo would shine, blocking your view of the wires going to the pole, or the trees nearby. And the reflected light from the phone's flashlight is not strong enough to turn off the night mode completely. [Also, it's a little difficult to talk about a phenomenon that is rarely seen in everyday life - the light source spreads the light much further than in the game; more on this later]

Perhaps it would be better to start like this at all:

  1. Due to the limitations imposed by the foundations laid at the beginning of the development of the game (apparently), the light spreads around the character, and not in the form of a cone or other shapes, and if we had imagined how much the light spreads from the irl phone, we would immediately understand that with the current lighting implementation, we would have to make the phone light within a 5-7 radius of the player, which would look completely absurd in an open area, because the illuminated area around the character would be gigantic due to this rounded shape of lighting.
  2. Perhaps, in this regard, the game has very weak and unrealistic lighting from a phone flashlight and, possibly, a candle (and other faint glowing objects). Okay, just the shape of the lighting, but we are still talking about a very small radius. On this topic could be moved to the category of proposals and closed on this, if the light did not reduce visibility.
  3. For some trait, the character has basic visibility in the dark, which is impossible without light reflected from objects, because night vision implies, in the case of a person, and not as a superpower, to receive more light from the same points in space due to pupil dilation - the size of the light penetration area. Of course, we can say that light enters a dark room from cracks and all that, but it is clear that these are excuses. When a character sees objects around him in a dark basement, and does not walk and touch each object by touch, this is absurd.
  4. By linking 2 and 3, for some reason, this basic visibility decreases when you turn on a light source that is as weak as the flashlight from the phone in the game.

Expected behavior

The light shouldn't spread like that. The light from the flashlight should be greater than the visibility from point 3 during the absolute absence of other light sources.

Decision

Increase the illumination of such light sources at least to the basic visibility, which was discussed in paragraph 3. But it would be more logical to swap them.

I would like the statement that an object within a 3-step radius, becoming invisible due to the inclusion of light, would be the only argument, and still do not understand why you disagreed with it and / or did not designate the topic as a bug.

Zireael07 commented 3 years ago

CDDA tile has no defined size and never has had one, why are you saying that cellphone light range should be 5-7 tiles?

0x9conc1 commented 3 years ago

@Zireael07 Sorry, I should have been more specific: comparing the lighting from my nokia phone of some kind, push-button, with the distance that the light extends between the open door of the room and the kitchen through the corridor, I estimated that its light is enough to illuminate about 3-4 sofas in the distance, so that they are clearly distinguishable with objects on them, 3-4 sofas each 2 meters. Somewhere 6-8 meters of reliable lighting. Then I looked at the sofas in the game and estimated that 1 tile = 1 meter, looking at the size of the sofa, because sofas are occupied by people along their length from the pillow to almost the edges.

update: I meant beds, not sofas. I just sleep on the couch - I don't have a bed. 2x2 tile beds, double. I looked at them. update2: In the game, we are talking about the backlight from the screen, not the flashlight, so we are just talking about the fact that the terminal effect should not work here

0x9conc1 commented 3 years ago

Perhaps everything is very simple, but for other reasons: the whole thing may be in the incorrect interaction of perception with weak light (or even with light).

Hereinafter, the light everywhere in this message is from a cell phone. 1) So, a character with perception 4 in the basement with the light seen within 1 (without light 0), in the room above - in a radius of 3, with light or without light, only the tile where we stand and within 1 become lighter, and the range has not increased (~it should not be - the inclusion of light should increase the radius of visibility~ lighting from the cell phone screen - everything maybe is ok here given that there was some kind of light source, since we saw objects in the dark; although there is no light source at all. this is probably a simulation of the character's perception skill). 2) With perception 14, a character in a basement with light saw within a radius of 1 (without light 4), outside the basement in a building with light saw within a radius of 3 (without light 5). ~Of course, this should not be the case. It must be that we see more with light than without light sources~ (and I do not think that the weak light from the cell phone screen turns off night vision to stop seeing objects that we have seen before from a weak illumination is not clear what source) ((or even so: objects in such a radius (in which we saw) at least a little, but will become lighter, and if the pupil contract a little, moving a little away from night vision, we will still see at such short distances, to which the light should reach and at least a little illuminate-to compensate for the loss of night vision). Apparently, the game always simulates this effect, the effect of looking at the terminal, as if this light makes us unaccustomed to the darkness around us, but this is not so, because it is not a light shining directly into our eyes, .

Comments:

Solution: make the terminal effect only during crafting, reading and all that, as well as during turning off the light, to simulate the effect of adaptation of the eyes to weak light sources (it is not known what nature, in the basement, for example (see above in the text about perception)).

ZhilkinSerg commented 3 years ago

Just so you know - the light always shines into your eyes. That is basically how you see.

0x9conc1 commented 3 years ago

@ZhilkinSerg Yes it is. You might assume that I know this, because I already wrote

maybe you assumed it because of this:

besides, what are you talking about? or that's it.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not \'bump\' or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.

LeahLuong commented 2 years ago

Not much of a suggestion & barely a discussion but I suppose it needed some kind of tag after being inactive for over a year. Truly arduous getting to this point in the thread & I don't know whether to admire or pity you if you read everything above. Still, I think OP has a point (if only an extremely circuitous, long-winded 1): weak light sources like video screens or candles prob shouldn't impact night vision as much as they do.

Cell phones as flashlights in-game are worse than useless because they tend to highlight you while simultaneously decreasing your ability to see further. Fighting in darkness near lab consoles is needlessly hazardous; 1 instinctively wouldn't look @ the screen if perceived danger was near because of its effect on night vision.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not \'bump\' or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.

Night-Pryanik commented 1 year ago

Closing as stale, since stalebot can't do this by itself.