OpenKeeper
OpenKeeper copied to clipboard
fog of war
Have some idea how its realized in game?
Not really no. But I do know that implementation wise we need to have map per player and a real map (or some hashmapping per player etc.). Besides the "fog" they might see different terrain type.
There was the terrain type of fog of war, which was the normal claimable tile.
I am about black plane tiles: Conceal and Reveal. Maybe this is rectangle over all map with black color texture. Exploring of a region change transparent state of this texture in current location.
I don't know what is the most efficient way. But if we have pure rectangles, we can just have a huge plane with 1 pixel per tile texture. And modify the texture.
I believe the hand is also a light source, which can temporarily remove some shroud, the edges of the discovered areas are demarkated with diggable tile, only to dissappear when you get close. Are there Three leve?ls Undiscovered, Discovered and Reshrouded? Reshrouded in case you Discovered it but have no presence in the area for x time?
It probably depends on your area of influence. You can disable this shrouded fog of war in the registry, but the lightning gets weird (the same way when you are remove the complete fog of war ingame). It doesn't even react to the light of the hand in any way.
Normal:

Without shrouded fow:

Interesting that it actually doesn't turn of the complete fog of war.
Maybe unclaimed/undigged tiles that are completely enclosed by at least one layer keep the FOW?
From what I've read, most tutorials seem to start of with a PostProcessor, and some more difficult ones use a shader. Spell Sight Of Evil also works with the FOW.