Fog of war and lighting.


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.

Lighting:

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:

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.

NPCs:

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.

Bugs:

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:

  • Still more noise.  I'm just going to keep adding this to the list until I do it...
  • Inland bodies of water.  Lakes, ponds, etc.

Eventually:

  • Local maps.  Each hex will have it's own corresponding local map.  64x64 or something like that.
  • Caves to explore.  I want to generate some caves using a few different noise types.

Thanks for stopping by.

Leave a comment

Log in with itch.io to leave a comment.