Fog of war

Started by
3 comments, last by Just_Me 23 years, 10 months ago
Can anyone tell me how to make fog of war in a RTS-game or where I can find an article that covers the subject?
Advertisement
I figure fog of war is easy enough to implement. If you have your game already keeping the unexplored areas masked, then it should be simple to add fog of war. What you do is simply make another entry in your map file, like the one for the unexplored area, and have this entry be reset every once in a while, and when you go to update the unexplored area field, update this new one as well. I belive the blizzard games cleared this field once a second.

OneEyeLessThanNone

If you didn''t get an exploration masking thing done yet then thats another problem.

1 gun, 1 bullet, go have fun...
How about every frame you refresh like 20 units'' worth of fog of war - it would never slow down really and would look OK.
I thought about having almost like another til layer above EVERYTHING including units, which would just be black tiles and then some curves or something to make it look pretty, then your units would simply take away the FOW tiles above them to a certain radius. So a small unit would take out maybe 2 tile in all directions of it or something like that, it''d be stay about the same speed wheather you have 1 unit or 300 units, however it would always take that bit of time to do the tiling procedure for the top. Just my idea...
See ya,
Ben
__________________________Mencken's Law:"For every human problem, there is a neat, simple solution; and it's always wrong."
"Computers in the future may weigh no more than 1.5 tons."- Popular Mechanics, forecasting the relentless march of science in 1949
Think that fog of war is just a simple mask which comes above everything then player/unit is the key who opens/clears the mask with transparent color with his vision. This works well with RPGs. Don''t mask the WHOLE map, just the screen and then contain FoW in array, so when you come back it''s still there.

Time comes, time goes and I only am.

This topic is closed to new replies.

Advertisement