fabio-t/alone-rl

Improve day-night cycle lightning effect

Opened this issue · 0 comments

  • convert all colours to HSB (hue, saturation, brightness). This must also encompass the templates, palettes etc. This should make the below easy, otherwise it's a headache. This also implies one important thing: we store (we'll probably need a ColHSB class with three float fields) and modify HSB float values, and only convert to Color class when absolutely needed, eg when rendering.

  • there should be two thresholds: the "hard" one, over which we cannot see anything, and a "soft" one, where we tweak the above-mentioned v value proportionally to distance and hour of the day. To decide: beyond the hard threshold we either show pure black, or it's a "shadow" like now.

  • evaluate if the following makes sense: hour of the day adds a cap to "sight", black colour is for beyond-sight, shadow-view is for what is shaded by obstacles but within our sight radius, proportional darkness (but with items and creatures visible) is applied during low-sun hours inside our view radius to both the visible and shadowed cells.