supertux icon indicating copy to clipboard operation
supertux copied to clipboard

Magic Tiles affected by light intensity

Open Rusty-Box opened this issue 2 years ago • 2 comments

Something I keep noticing is that depending on how dark a sector/ambient light is the smaller the range of affect light has over magic tiles becomes. In my opinion this makes magic tiles quite annoying to deal with and "unfair" in a way as even though the light of a lantern clearly covers a magic tile, it will not appear active.

A magic tile should just ignore the intensity of the light and rather check for just the range of the actual light graphic.

As you can see in the screenshots below, in a darker sector, the light barely covers 3 magic tiles whereas in a brighter sector in covers much more at once!

Screenshots: Sector with 0 light Sector with 0.5 light

Rusty-Box avatar Oct 15 '23 23:10 Rusty-Box

A magic tile should just ignore the intensity of the light and rather check for just the range of the actual light graphic.

There's an unfinished Pull Request for this: #2085 There's also a very similar issue: #1939

I'm in favour of this; here are some reasons:

  • Using the actual light can cause backwards compatibility problems in levels, for example when the lighting algorithms or lightmap texture files change. A lighting algorithm change can be, for example, the addition of tone mapping or gamma-correct rendering (#1799).
  • How the game behaves is non-deterministic since it depends on when frames are rendered (including the lightmap) and when physical steps are executed, i.e. the behaviour depends on the GPU performance.
  • It can be very complicated for a player to predict what the actual light is. One of the reasons is that the brightness of a linearised sRGB colour, and even of a non-linearised sRGB colour, is significantly different from perceptual brightness. Another reason is the use of lightmap texture files since they may not simply encode an euclidean distance to the centre of the light source.
  • Using the actual light is bad for performance (#2085).

HybridDog avatar Oct 20 '23 17:10 HybridDog

I agree with @HybridDog

mrkubax10 avatar Oct 20 '23 19:10 mrkubax10