OpenKeeper icon indicating copy to clipboard operation
OpenKeeper copied to clipboard

fog of war

Open ArchDemons opened this issue 9 years ago • 6 comments

Have some idea how its realized in game?

ArchDemons avatar Feb 05 '16 18:02 ArchDemons

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.

tonihele avatar Feb 05 '16 18:02 tonihele

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.

ArchDemons avatar Feb 28 '16 15:02 ArchDemons

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.

tonihele avatar Feb 28 '16 21:02 tonihele

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?

belgianguy avatar Aug 23 '16 21:08 belgianguy

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: shot0004

Without shrouded fow: shot0003

Interesting that it actually doesn't turn of the complete fog of war.

ufdada avatar Aug 24 '16 10:08 ufdada

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.

belgianguy avatar Aug 24 '16 11:08 belgianguy