Higher LOS refresh-rate?

Higher LOS refresh-rate?

Requests for features in the spring code.

Moderator: Moderators

User avatar
wilbefast
Posts: 255
Joined: 14 Oct 2009, 18:04

Higher LOS refresh-rate?

Post by wilbefast »

LOS refreshes quite slowly for me - that's fine for slow-moving units but for high-speed, high-LOS air scouts (for example) it can be rather jarring. I think there's maybe 1-2 refreshes per second maximum.

Image

Image

That said every time I ask about something I get pointed to a lua script, so the next time round I look for a lua script and can't find one, so post again and get pointed to another script.

If there's a lua script for this that I haven't found, after all that looking, I will cry :cry:

William
Last edited by wilbefast on 01 Dec 2009, 07:05, edited 2 times in total.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Higher LOS refresh-rate?

Post by hoijui »

LOS is a CPU intensive thing, that's why it is limited to not actualize that often. i think there were discussions for other algorithms, but it did not seem like anyone is willing to code and test them.
..it is all more complex, and i forgot the details. but this is not one of the things that should be done by Lua (do not know if it was possible even).
User avatar
wilbefast
Posts: 255
Joined: 14 Oct 2009, 18:04

Re: Higher LOS refresh-rate?

Post by wilbefast »

Hmmm?.. I've done LOS before and it wasn't that CPU heavy... oh wait - Spring doesn't just erase circles, you're actually checking sight arcs and so on aren't you? Ouch! I can imagine that would take a lot of calculations...

Couldn't you refresh a give unit's sight line more or less depending on its current speed? That way immobile units would never be re-calculating their LOS (or maybe very rarely if there's deformable terrain) and speedy ones would do it quite frequently when moving around.

Also air units needn't perform half as many checks as ground ones, since they're only looking down, and their LOS is rarely obscured.

That said...
hoijui wrote:i think there were discussions for other algorithms, but it did not seem like anyone is willing to code and test them.
Anyway, thanks for replying - it's good to know :-)
User avatar
Tribulex
A.N.T.S. Developer
Posts: 1894
Joined: 26 Sep 2009, 21:26

Re: Higher LOS refresh-rate?

Post by Tribulex »

hmmm, just make a circle on the map in lua that follows the scout around. Piece of cake.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Higher LOS refresh-rate?

Post by hoijui »

i though the question was about the actual Los in game, as in, what the engine uses for calculations, its inner state. if you just want to know the sight of a unit/units visually, then yeah.. follow d_b.
User avatar
wilbefast
Posts: 255
Joined: 14 Oct 2009, 18:04

Re: Higher LOS refresh-rate?

Post by wilbefast »

What I meant was the "fog of war", which I believe is called "line of sight" in Spring, or rather the fog is drawn where no unit has line of sight.

Fog is off by default which I find really annoying, but you can easily turn it one using lua (look up what commands 'l' and ';' correspond to and then execute them). Fog is important for knowing what you can and can't see :o
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: Higher LOS refresh-rate?

Post by CarRepairer »

wilbefast wrote:What I meant was the "fog of war", which I believe is called "line of sight" in Spring, or rather the fog is drawn where no unit has line of sight.

Fog is off by default which I find really annoying, but you can easily turn it one using lua (look up what commands 'l' and ';' correspond to and then execute them). Fog is important for knowing what you can and can't see :o
The problem is shadows don't draw when fog of war is on. I personally can happily sacrifice shadows for fog of war, but plenty of people prefer the prettiness of shadows to show up in their game if means losing FoW.
User avatar
wilbefast
Posts: 255
Joined: 14 Oct 2009, 18:04

Re: Higher LOS refresh-rate?

Post by wilbefast »

CarRepairer wrote:The problem is shadows don't draw when fog of war is on. I personally can happily sacrifice shadows for fog of war, but plenty of people prefer the prettiness of shadows to show up in their game if means losing FoW.
I'd take function over appearance any day :twisted:
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Higher LOS refresh-rate?

Post by lurker »

LOS updates twice a second. Are you asking for the LOS you can't see to update faster, or are you asking for "l" view to update faster?
User avatar
wilbefast
Posts: 255
Joined: 14 Oct 2009, 18:04

Re: Higher LOS refresh-rate?

Post by wilbefast »

I meant the "fog of war" - which apparently nobody uses. It's handy for knowing the extent of your sight range. But isn't the fog just a visual representation of all your units' lines of sight?
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: Higher LOS refresh-rate?

Post by Pxtl »

wilbefast wrote:I meant the "fog of war" - which apparently nobody uses. It's handy for knowing the extent of your sight range. But isn't the fog just a visual representation of all your units' lines of sight?
The same thing. The thing is that, for performance reasons, teh graphical representation of the fog of war/los map (visible when you press the L key) updates much slower than the real, actual fog-of-war/LOS map used under the hood by the engine.
User avatar
wilbefast
Posts: 255
Joined: 14 Oct 2009, 18:04

Re: Higher LOS refresh-rate?

Post by wilbefast »

Pxtl wrote:
wilbefast wrote:I meant the "fog of war" - which apparently nobody uses. It's handy for knowing the extent of your sight range. But isn't the fog just a visual representation of all your units' lines of sight?
The same thing. The thing is that, for performance reasons, teh graphical representation of the fog of war/los map (visible when you press the L key) updates much slower than the real, actual fog-of-war/LOS map used under the hood by the engine.
Yeah - well I can appreciate that. So long as it's a performance related problem and not just...

it's fine :wink:
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Higher LOS refresh-rate?

Post by lurker »

It's not much performance, though, I'm sure it could be set to go faster.
User avatar
Tribulex
A.N.T.S. Developer
Posts: 1894
Joined: 26 Sep 2009, 21:26

Re: Higher LOS refresh-rate?

Post by Tribulex »

CarRepairer wrote:
wilbefast wrote:What I meant was the "fog of war", which I believe is called "line of sight" in Spring, or rather the fog is drawn where no unit has line of sight.

Fog is off by default which I find really annoying, but you can easily turn it one using lua (look up what commands 'l' and ';' correspond to and then execute them). Fog is important for knowing what you can and can't see :o
The problem is shadows don't draw when fog of war is on. I personally can happily sacrifice shadows for fog of war, but plenty of people prefer the prettiness of shadows to show up in their game if means losing FoW.
Yeah this is an annoying bug. Can we get shadows unbugged for fog of war?
User avatar
JohannesH
Posts: 1793
Joined: 07 Apr 2009, 12:43

Re: Higher LOS refresh-rate?

Post by JohannesH »

Pressing l on and off redraws the fog, and I havent noticed much performance drop from doing so (yes sometimes thats what i have to waste time on). Imo the default refresh for that should be more frequent

At least when switching who to spectate the fog should be redrawn immediately
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: Higher LOS refresh-rate?

Post by CarRepairer »

JohannesH wrote:Pressing l on and off redraws the fog, and I havent noticed much performance drop from doing so (yes sometimes thats what i have to waste time on). Imo the default refresh for that should be more frequent

At least when switching who to spectate the fog should be redrawn immediately
Or just add a setting in the config file, with corresponding in-game command.
User avatar
wilbefast
Posts: 255
Joined: 14 Oct 2009, 18:04

Re: Higher LOS refresh-rate?

Post by wilbefast »

CarRepairer wrote:Or just add a setting in the config file, with corresponding in-game command.
??? :shock:
User avatar
Tribulex
A.N.T.S. Developer
Posts: 1894
Joined: 26 Sep 2009, 21:26

Re: Higher LOS refresh-rate?

Post by Tribulex »

wilbefast wrote:
CarRepairer wrote:Or just add a setting in the config file, with corresponding in-game command.
??? :shock:
??? @ ????


but really, ???
User avatar
wilbefast
Posts: 255
Joined: 14 Oct 2009, 18:04

Re: Higher LOS refresh-rate?

Post by wilbefast »

d_b wrote:
wilbefast wrote:
CarRepairer wrote:Or just add a setting in the config file, with corresponding in-game command.
??? :shock:
??? @ ????


but really, ???
??? @ ??? @ ??? :shock:



Seriously though, what I meant was: how would one do such a thing? Execute the command twice and repeat ever xth of a second for a higher refresh rate? Yeah, probably that. Maybe I should have thought about it a bit before being giving up. Giving up before thinking is easier though.

I'm a digital native - I want instant gratification, like yesterday!
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: Higher LOS refresh-rate?

Post by Pxtl »

He meant that such a config value should be a new engine feature.
Post Reply

Return to “Feature Requests”