Archived

This topic is now archived and is closed to further replies.

Just_Me

Fog of war

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites
How about every frame you refresh like 20 units'' worth of fog of war - it would never slow down really and would look OK.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites