Tiles mode and lighting

I don’t know if this qualifies as a suggestion or a bugreport, but there is currently an odd sort of issue with the SDL tiles mode.

Specifically, the issue is that, bar pitch black darkness and obscured LOS, the SDL Tiles mode of Cataclysm does not visualize lighting like the ASCII/Curses mode does.

It’s best visible when comparing pure SDL ASCII (with a bitmap font), with an ASCII-alike tileset.

[/spoiler][spoiler=ASCII-alike tileset with same bitmap font]

Notice the area inside the garage.

I’ve looked in the Cataclysm code, and it seems that the lighting is drawn in one pass, before the items, terrain, and everything else is drawn. This makes sense for opaque lighting tiles - boomered vision, pitch darkness, and obscured LOS. But for low-light conditions that are displayed as greyed symbols in SDL ASCII mode, wouldn’t it make more sense to draw the lighting tile as an overlay instead, like the “multiple items” highlight indicator - but after everything else is drawn, in a separate pass?

I can’t compile the latest experimentals on my own for now, or I would’ve tested if it’s even possible, but it doesn’t seem outside the realm of possibility, and it might add back some of the missing ambiance to the tiles mode view.

I 100% agree with this. I haven’t played the ASCII version, but the permanoon tiles REALLY throw off my sense of time in the game.

Plus adding an overlay to show glare or show dim light would probably be really useful for immersion, and make sneaking around in the pitch black Soooo much more creepy. (Not to mention make it more obvious that consoles and possibly other things glow)

I don’t know what the image processing capabilities are in SDL, but it seems like something that would be doable.
We could even do better and have smoother gradients once I have the raytraced lighting sorted out. (my next big project after the gun aiming system)

Oh this is gonna be AWESOME!

It could probably do a visibility pass after printing to block out all the tiles that are obscured rather than preventing them from being printed. If I understood correctly…

There are basically two ways to do this kind of thing, either you modify each tile as its rendered, or you build a alpha layer mask and render it to the draw buffer as a final step. the first might be faster if it’s well supported in SDL, the second has the benefit of being a single pass, but might not be as optimised.