Posted February 15, 2024 by old_flick
This is a fairly big update, and took quite a bit of messing around with tilemaps to figure out a way to do it. I've added in lighting with a day/night cycle, a fog of war effect, as well as a bunch of silly little critters that run around.
The player now has a 'luminosity' value, which creates an area of light around them. As the day/night cycle runs, the area directly around the player remains well lit. You can still see terrain and NPCs wandering around the map in the dark, until it becomes full night.
Fog of war differs from lighting in that you can only see terrain that you have previously discovered, and NPCs are only visible within the luminous area around the player. You can see what the terrain was on a hex the last time you saw it, but that's all you know.
Using Fog of War and lighting together currently works, although it does tend to darken up the un-fogged areas quite a bit, and you still cant see them at full night.
I added a bunch of silly little NPC critters running around, mostly just to demonstrate the difference between the lighting and fog of war effects. You can toggle them on or off if they get distracting.
I fixed a bug in the .png saving routine where there was some excess space on the right and bottom sides of the image.
Next up:
Eventually:
Thanks for stopping by.