Fog of War II

Started by
14 comments, last by mtemple 22 years, 7 months ago
Mmmmm. Yes. And since my terrain map does not use too many tiles, having a duplicate of each would really not have too much of an impact.

Thanks again!!!
Advertisement
Whooops!! That last post was from me!

Mark Temple
Enemy Technology
Mark TempleEnemy Technology"We have found the enemy, and he is us!"
Well we did the same FOW style as Starcraft in our game Hostile Encounter (www.hostileencounter.com)

We use 32bitASM at a resolution of 800x600x16....goes pretty nice and fast we also do shadows, glow and other lots of stuff...

FOW will have to be redraw every frame and yeh we do all operations in system ram as video ram read is 10x slower,

also you can use a faster 50% alpha with and AND and a shift/add

we know everything about Fog Of War

tell me if you want details

obysoft
bogdanontanu,

Yes! I would love details if it''s not too much trouble. I am working in 800x600x16 also so this would really be a great help. FOW seems to be a bit of a black art so whatever you are willing to share would be GREATLY appreciated.

Thank you very much,


Mark Temple
Enemy Technology

"We have found the enemy, and he is us!"
Mark TempleEnemy Technology"We have found the enemy, and he is us!"
I`m working on a quasi-3d engine designed for a RTS.
Currently I`m using shaded tile for the map and OGL.
Anyway, I`m thinking about using fog for my FOW.
I have not sat down and implemented it yet, I have textureing to implement and a culling prob to work out, so I dont know how it would work.
So, I`m thinking that a fog with something like R = 0, G = 0, B = 0 A = 128 would be okay.
Thats what I`m gonna try.
~V''lion


I came, I saw, I got programmers block.
~V''''lion
~V'lionBugle4d
Here''s a suggestion for fog of war that''s a bit different from the ones previously mentioned. It does require a bit more muscle on the processing side to run smoothly, but in an efficiently coded engine, it looks pretty nice. Instead of giving the tiles in your map the FOG_IN/OUT property, make an entire layer on your map for the fog. Whenever drawing the map, do it so that the entire map is fogged. In other words, draw the entire screen with a darkening filter. Or, just load your map at the beginning of the game darkened. Then, use your object array to draw a fading ''lightening'' circle around each object that should clear the fog of war, with a radius equal to that object''s visibility range. The effect is that the fog does not look ''tiley'', but smooth. There is no impact on memory, because you''re using data that you would need in the game anyways, but like I said earlier, it eats a lot of processing time if you have many units on the screen. However, with a bit of optimization, the effect really pays off, and makes the game look more polished. For one thing, you could make your visibility ranges in set denominations, and load the different circles in the background, then add the preloaded images on top of the objects, instead of recalculating them each time. I''m currently working on a multiplayer online RTS engine for java, and I''m implementing this method. It runs OK with a fast system under JRE, so it should run fine in a language more suitable for graphic-intensive games.

--kcigam

This topic is closed to new replies.

Advertisement