Page 1 of 1

Fog of war

PostPosted: Fri Aug 08, 2008 10:00 am
by 4erv'
Hey guys, have you got any ideas how to make fog of war? :mrgreen:
Example:

Re: Fog of war

PostPosted: Fri Aug 08, 2008 11:05 am
by 4erv'
Already figured it out :D

Re: Fog of war

PostPosted: Fri Aug 22, 2008 2:36 am
by j2graves
this will be great for people who wanna make strategy games! =D

Re: Fog of war

PostPosted: Tue Aug 26, 2008 3:37 pm
by 4erv'
Well.. my way to make fog of war isn't very good. It's like deleting the squares on collision. It works good, but the squares are big, and looks strange. I've tried to make the squares smaller, but when i make them clone -> array to the all map, the game is running VERY slow.
Is there any other way, to make fog of war? :?

Re: Fog of war

PostPosted: Wed Aug 27, 2008 2:08 am
by BlarghNRawr
what do you mean?
"fog of war"?
items dissapearing untill they're in ur line of sight (age of empires), or everything just darker, but you can still see it...
:D

Re: Fog of war

PostPosted: Wed Aug 27, 2008 2:09 am
by feral
i have a few ideas, but as i have never played a game with "fog of war effect". I sort of need a screen shot of the way you currently have it working to get a better idea..

I am also assuming this is only for a top down 2D map game ?

A few quick ideas tho would be to

1. use RGB to set existing "tiles' to Black - you can then fade in to full color in stages if needed ( not sure how it would work on tiles as i have never used them.. but i will look into

2. ensure only those items on screen are being drawn ( to speed it up)

but I really need a better idea of the effect you want..?

eg: do you want a real "mapped" fog of war, or just a circle of sight around your immediate area ? which is what the original screen shot seems to show..

Re: Fog of war

PostPosted: Thu Aug 28, 2008 11:37 am
by 4erv'
feral wrote:real "mapped" fog of war
??? :oops:
what do you mean? :? :oops:

Re: Fog of war

PostPosted: Thu Aug 28, 2008 11:17 pm
by feral
4erv' wrote:
feral wrote:real "mapped" fog of war
??? :oops:
what do you mean? :? :oops:


by mapped , i mean if you are looking down on the map some areas will be blacked out ( if you haven't yet explored them) and others will be in full detail if you have - or sometimes "greyed" out if you haven't fully explored them or haven't for a while.

essentially I mean the "fog" will be in different patches of the map rather then just a large circle around the character.. think of quake/doom style games where the automap won't show you places you haven't been.

sorry i don't quite get the idea of what you want, I haven't played starcraft.

attached is a "rough" "hand-drawn" concept
left side "mapped" - right side, simple "fog"
fogofwar.jpg

click to enlarge pic

(screengrab borrowed from hblades RPG demo ( I hope that is ok..)

Re: Fog of war

PostPosted: Fri Aug 29, 2008 9:42 am
by 4erv'
yes, i want mapped, but i can't make it look smooth. :?
Heres my version:
Strategy Template (with fog of war).zip
jimmynewguy's strategy template
(3.85 MiB) Downloaded 144 times

Let me know if it not working, because i dont have game-editor right now. :(

Re: Fog of war

PostPosted: Sat Aug 30, 2008 5:07 am
by feral
4erv' wrote:yes, i want mapped, but i can't make it look smooth. :?
Heres my version:


here is an exe ( use cursor keys to move)

Not complete nor well coded, i just need to know if this is what you mean.. ? it doesn't yet scroll the view, but is easy done.
fogdemo3.zip
(886.71 KiB) Downloaded 133 times

fogdemo3.jpg

click to enlarge

Re: Fog of war

PostPosted: Sat Aug 30, 2008 6:01 am
by feral
and an much easier way ...( i should have tho9ught of this first ..gugh)

anyhow replace your fog.png with the fogcopy.png attached here
fog copy.png
fog copy.png (4.02 KiB) Viewed 1948 times

Re: Fog of war

PostPosted: Sun Aug 31, 2008 1:35 pm
by 4erv'
Thanks! I will try it when i will get my pc back. :D

Re: Fog of war

PostPosted: Thu Sep 04, 2008 6:12 pm
by 4erv'
OMG it was so easy! :oops:
Looks alot better! Thank you very much! :D