Before:
After:
Bug was introduced in January 20. release. Relevant code is in map.cpp and the change is to comment out the lines you can see highlighted in the above screenshots:
// Don't display area as shadowy if it's outside and illuminated by natural light
else if (dist <= g->u.sight_range(g->natural_light_level()))
{
lowlight_sight_range = std::max(g_light_level, natural_sight_range);
}
This is my first look at the source code so I have no idea what else could be impacted by this change. Anyway, I find it strange something that modifies range would manifest only on one side of the character. So the the real question for me here is what was that piece of code supposed to achieve in the first place?
In one way or another it apparently has something to do with a rim of grey dots around light edges, I guess that’s what you call “gradual night light”. Maybe not, but in any case I could not figure out what is “gradual night light” option supposed to do, I don’t see any difference.
There is another light related feature that got lost somewhere between January 20. and February release. Perhaps it was done on purpose, but I’d like it back, what’s the relevant part of the code? I think I can make some improvements with the whole light/shadows thing, so I’d like to know where in the code should I be looking at.
At the top is January 20. release and you can see a light cone from the window turns otherwise grey floor and wall tiles to blue, while terminal below runs more recent release and the effect is gone. What is relevant block of code that handles that? It’s rather obvious change so I don’t see how could that end up in a release build, was it done on purpose? Also, ground and door tiles changed from yellow to brown, where can I change those?
I think this game is pretty good as it is, but has even greater potential. So for that I’d like to improve and make some additions to light/shadows system. For the best results I’d need 256 colors, has anyone maybe looked into it and knows how simple or complicated would be to introduce some new console library that supports at least 256 colors, if such thing exists?
But more importantly I’d need to familiarize myself with the code a little bit better, to know where to even begin with, so give me some pointers how to navigate through those files. Just some basics directions, for example, I want to change dark/night tile from “#” to empty " ", where is the code for that?
And one more thing. In windows version I can adjust font width and height in FONTDATA file to 16x16 which gives me nice square output, but on Linux doesn’t seem to work. Any hints? It’s particularly nice to have square characters for vehicles and driving as 8x16 makes it look terribly distorted.