Fog of War - Page 2

Fog of War

Requests for features in the spring code.

Moderator: Moderators

Gnomre
Imperial Winter Developer
Posts: 1754
Joined: 06 Feb 2005, 13:42

Re: Fog of War

Post by Gnomre »

Google_Frog wrote:
This one I do know! Hit ; after hitting L, it changes to just LOS and radar in different shades of grey that way.
This doesn't show radar though.
Oh, what is it then? AirLOS I guess? Can't really be much else...

Also, all-black shrouds suck. They're pointless; people just memorize the maps anyway, giving a huge advantage to those who have played on the map even once. It's only partially mitigated if things like resources are moved around, because positioning and terrain is just as important and just as easily memorized. Shrouds are really only acceptable for sp missions and even then they're annoying because you have to go map the place out before you can ever queue anything to build there...
User avatar
REVENGE
Posts: 2382
Joined: 24 Aug 2006, 06:13

Re: Fog of War

Post by REVENGE »

Anybody willing to revamp the "L" key los visualizer?

Oh wait, nope! :lol:
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Re: Fog of War

Post by Warlord Zsinj »

I agree with gnome re: black shrounds. But having a semi-opaque fog of war would be nice, as it'd make the breaks between units popping into and out of view far less ugly, as well as being more intuitive for players.
User avatar
REVENGE
Posts: 2382
Joined: 24 Aug 2006, 06:13

Re: Fog of War

Post by REVENGE »

Is it for cost reasons that the losmap is updated really slowly? What would be the implication of having it update, say, once every 5 - 10 gameframes?
pktm
Posts: 57
Joined: 05 Aug 2006, 15:49

Re: Fog of War

Post by pktm »

Brain Damage wrote:press L ingame
That sucks. I don't need cool grahpics if I turn them into a colored mess.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: Fog of War

Post by Kloot »

REVENGE wrote:Is it for cost reasons that the losmap is updated really slowly?
Yes.
What would be the implication of having it update, say, once every 5 - 10 gameframes?
The cost would rise 1.5 to 3 times (LOS states are updated every 16 frames).
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Fog of War

Post by jK »

A solution would be to use the GPU for the los visualization.
It would even allow much higer resolutions and would be ways faster.
PhailQuail
Posts: 35
Joined: 17 Sep 2008, 15:54

Re: Fog of War

Post by PhailQuail »

Maybe this is the sort of thing that could be done on another CPU core? Spring needs better multi-core optimisations.
User avatar
REVENGE
Posts: 2382
Joined: 24 Aug 2006, 06:13

Re: Fog of War

Post by REVENGE »

Both of the above two suggestions sound great, although I have to question why jK's recommendation isn't the default way of doing things.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Fog of War

Post by Tobi »

Because it didn't fit the original goal of the feature, which is being able to debug the LOS map and LOS update/check code.
User avatar
REVENGE
Posts: 2382
Joined: 24 Aug 2006, 06:13

Re: Fog of War

Post by REVENGE »

Tobi wrote:Because it didn't fit the original goal of the feature, which is being able to debug the LOS map and LOS update/check code.
Interesting, seems to correspond to one of the reasons why the original hardcore TA player base didn't quite take to the Spring engine. :P
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Fog of War

Post by Tobi »

Huh, because LOS map is originally ment for debugging they don't switch over? So if it was ment as ugly fog of war they would have switched over? :roll:
dizekat
Posts: 438
Joined: 07 Dec 2007, 12:10

Re: Fog of War

Post by dizekat »

L shows the radar range all right. The dark blue/purple color by default. Just build a radar and look.

BTW, a while ago i made widget to change los colors.
Widget:
http://dmytry.pandromeda.com/tmp/lua_fo ... colors.lua
Add into cmdcolors.txt :
alwayscolor 0.2 0.2 0.2 1
loscolor 0.2 0.2 0.2 1
radarcolor 0.1 0.25 0.1 1
jamcolor 0.3 0.0 0.0 1
It depends on some stuff tho, for loading cmdcolors.txt . I'll update it sometime to use new way to store widget settings.
REVENGE wrote:Both of the above two suggestions sound great, although I have to question why jK's recommendation isn't the default way of doing things.
Think about it a little and you'll realize why none of above great sounding suggestions can even be the way of doing things, let alone default way.

LOS (line of sight) is synced - it affects how units are automatically attacking (or not attacking) enemy units.
Consequently, any new LOS thing must give identical results for all players. Suppose LOS was to be updated more often, suppose, even using extra cores. At the multi-player game, rate of LOS updates per real world second will be determined by player with worst CPU anyway, same as it is now.
Sync also totally rules out use of GPU for actual LOS computations. Things don't work identical on ATI and NVidia, and not even between different NVidia cards. Should be proof enough that presently synced stuff can not be done on GPU.

However, its true that GPU can be used to draw "fake" fog of war at much higher resolution and update rate, but which doesn't correspond to the synced LOS used for game simulation. I would never use it though. I'm not interested in seeing some fake LOS at all.
I don't think that many players want that either.
Last edited by dizekat on 26 Oct 2008, 12:01, edited 1 time in total.
User avatar
REVENGE
Posts: 2382
Joined: 24 Aug 2006, 06:13

Re: Fog of War

Post by REVENGE »

dizekat wrote:L shows the radar range all right. The dark blue/purple color by default. Just build a radar and look.

BTW, a while ago i made widget to change los colors.
Widget:
http://dmytry.pandromeda.com/tmp/lua_fo ... colors.lua
Add into cmdcolors.txt :
alwayscolor 0.2 0.2 0.2 1
loscolor 0.2 0.2 0.2 1
radarcolor 0.1 0.25 0.1 1
jamcolor 0.3 0.0 0.0 1
It depends on some stuff tho, for loading cmdcolors.txt . I'll update it sometime to use new way to store widget settings.
REVENGE wrote:Both of the above two suggestions sound great, although I have to question why jK's recommendation isn't the default way of doing things.
Think about it a little and you'll realize why.
LOS (line of sight) is synced - it affects how units are automatically attacking (or not attacking) enemy units.
Consequently, any new LOS thing must give identical results for all players. Suppose LOS was to be updated more often, suppose, even using extra cores. At the multiplayer game, rate of LOS updates per real world second will be determined by player with worst CPU.
Syncness also totally rules out use of GPU for actual LOS computations. Things don't work identical on ATI and NVidia, and not even between different NVidia cards, should be proof enough that presently synced stuff can not be done on GPU.

However, its true that GPU can be used to draw "fake" LOS at much higher resolution and update rate, but which doesnt correspond to the synced LOS used for game simulation. I would never use it though. I'm not interested in seeing some fake LOS.
Holdon a second, you're confusing me now.

My belief was that the actual los code with the current los state is updated more or less constantly, every frame; however, the los VISUALIZER as depicted by the L key is only updated every 16 frames. Therefore, I took jK's idea to mean that we could have a nice traditional "fog of war" styled los visualizer drawn by the GPU. If I am wrong, then well...:twisted:.

Tobi, my point was that the hardcore TA players didn't like not having a proper PRETTY fog of war los display, instead getting only radar dots and whatnot.
dizekat
Posts: 438
Joined: 07 Dec 2007, 12:10

Re: Fog of War

Post by dizekat »

REVENGE wrote: Holdon a second, you're confusing me now.

My belief was that the actual los code with the current los state is updated more or less constantly, every frame; however, the los VISUALIZER as depicted by the L key is only updated every 16 frames. Therefore, I took jK's idea to mean that we could have a nice traditional "fog of war" styled los visualizer drawn by the GPU. If I am wrong, then well...:twisted:.
Yea, you're wrong.
'Visualizer' currently just displays things as them are.
User avatar
REVENGE
Posts: 2382
Joined: 24 Aug 2006, 06:13

Re: Fog of War

Post by REVENGE »

dizekat wrote:
REVENGE wrote: Holdon a second, you're confusing me now.

My belief was that the actual los code with the current los state is updated more or less constantly, every frame; however, the los VISUALIZER as depicted by the L key is only updated every 16 frames. Therefore, I took jK's idea to mean that we could have a nice traditional "fog of war" styled los visualizer drawn by the GPU. If I am wrong, then well...:twisted:.
Yea, you're wrong.
'Visualizer' currently just displays things as them are.
Ah damn, that's too bad then. :?
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Fog of War

Post by lurker »

interpretation 1 {So there is a copy of the los map for visualization updated twice per game second? If so, then can that actually be what's displayed, rather than having a third los map that only updates in parts every once in a while? When I forced it to update the displayed view by holding the L key midgame I didn't notice a significant fps drop. }

interpretation 2 {Is that twice-per-second update only a very small portion of the map? If so, then I would welcome the small performance drop to do the entire map instead. When I forced it to update the displayed view by holding the L key midgame I didn't notice a significant fps drop. }
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: Fog of War

Post by Kloot »

1. a copy (overlay texture) of the LOS map is used for visualization
2. the LOS map is updated every 16 simulation frames (per unit)
3. not all unit SlowUpdate()'s happen on the same frame
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: Fog of War

Post by CarRepairer »

Gnome wrote: I have that set to 1 and it still disables shadows. (also tried 0 since it was already 1 when I checked, still disables). Also, whenever I enable LOS view, it not only disables shadows, it makes any units (including my own, which have their own LOS) not on-screen when it was enabled really dark.
I have good news for you. I had this very same problem till I upgraded my video drivers. If upgrade doesn't work for you, turn off reflective units.
To be more specific this only happened after I middle clicked the minimap, and toggling fog of war off/on would fix it, but that makes the game unplayable. So I played without reflective units forever till nvidia upgraded drivers. Fixed now.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Fog of War

Post by lurker »

Kloot wrote:1. a copy (overlay texture) of the LOS map is used for visualization
2. the LOS map is updated every 16 simulation frames (per unit)
3. not all unit SlowUpdate()'s happen on the same frame
Makes sense. I highly suggest updating the entire copy every 1-2 seconds, or at least having an option to do so.
Post Reply

Return to “Feature Requests”