Why does air cause lag? - Page 2

Why does air cause lag?

Various things about Spring that do not fit in any of the other forums listed below, including forum rules.

Moderator: Moderators

User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Re: Why does air cause lag?

Post by Das Bruce »

Tobi wrote:AFAIK it's been there from the start, but I wouldn't be surprised at all if it totally doesn't work and just consumes CPU.
It obviously works since you don't get massive stacks of aircraft flying through each other when they're on an attack run.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Why does air cause lag?

Post by lurker »

But it should definitely be a fixed small distance and not based on LOS.
User avatar
MightySheep
Posts: 243
Joined: 11 Nov 2007, 02:17

Re: Why does air cause lag?

Post by MightySheep »

The main reason I lag and crash so much is air patrol. I know people who spam fighters just to make me crash when i'm kicking there ass. As soon as fighters start spamming I go to 1 fps and 100% cpu. It would be great if you just turned that LOS off on BA.
zerver
Spring Developer
Posts: 1358
Joined: 16 Dec 2006, 20:59

Re: Why does air cause lag?

Post by zerver »

I believe it is not only collision detection, but also the code that finds suitable targets to attack. Many optimizations depend on that units don't move much, but the aircraft not only move, they are fast. The poor QuadField will have to be constantly updated.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: Why does air cause lag?

Post by Kloot »

That, and the LOS updates which are O(n^2) due to the explicit
representation of the LOS map (and much more expensive than
the quadfield updates since there are far fewer quads than LOS
table entries).
User avatar
LordMatt
Posts: 3393
Joined: 15 May 2005, 04:26

Re: Why does air cause lag?

Post by LordMatt »

Collision detection was already removed from air in BA.
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Re: Why does air cause lag?

Post by Warlord Zsinj »

Yeah, we made IW air units fly through each other to avoid strange behaviour where aircraft would fly into each other, and patrolling aircraft would over time destroy themselves. There is still notable lag when a number of aircraft are airborne.
User avatar
LordMatt
Posts: 3393
Joined: 15 May 2005, 04:26

Re: Why does air cause lag?

Post by LordMatt »

Also reduce LOS.
User avatar
Aeon_Illuminate
Posts: 42
Joined: 14 Feb 2008, 20:30

Re: Why does air cause lag?

Post by Aeon_Illuminate »

cong06 wrote:
Argh wrote:Because of collision detection for aircraft, and sometimes because they use a really long LOS.
Sort of a side question:
When was Collision detection ever used? I remember nukes flying into my planes (oh it was so annoying...great way to clear your base...have construction planes repair a nuke fac, while you're firing them...)
But I remember no incident where collision was used between aircraft...

Or did it simply keep them from flying on top of each other?
Back in the day when nukes collide with airplanes, I was playing a speedmetal of course and had 15 nuclear silos right in front of massive amounts of aircraft factory. I didn't knew about the collision back then. As usual, I toyed with my enemy until they reaches certain point so I get worthy game. It got to the point where I had to end it before they become more powerful. So I fired all nukes and suddenly BAM! Because it was sort of in the center, it wiped it all pretty much. Stupid part was I told them about it because it was so weird at the time.
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Re: Why does air cause lag?

Post by Warlord Zsinj »

aircraft with poor LOS struggle, though - especially when targetting ground units with no radar coverage. They'll regularly forget the location of the unit they were attacking (I know that they'll place a ground fire option at the last known location, but this can often be counter-productive). It's also bad for dogfighters who lose track of their targets, especially when you have a faster fighter trying to take down a slower bomber. You really need reasonable LOS for those aircraft to perform reliably.
User avatar
MightySheep
Posts: 243
Joined: 11 Nov 2007, 02:17

Re: Why does air cause lag?

Post by MightySheep »

Nukes hitting planes was removed a long time ago. That happened to me too on DSD.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: Why does air cause lag?

Post by KDR_11k »

Nukes hitting aircraft has nothing to do with aircraft collision. Nukes are projectiles and have different behaviour.
Saktoth
Zero-K Developer
Posts: 2665
Joined: 28 Nov 2006, 13:22

Re: Why does air cause lag?

Post by Saktoth »

Nukes were made to not collide with friendlies at all in BA and CA. This has nothing to do with planes not colliding with oneanother though, as KDR pointed out.
Warlord Zsinj wrote:aircraft with poor LOS struggle, though - especially when targetting ground units with no radar coverage. They'll regularly forget the location of the unit they were attacking (I know that they'll place a ground fire option at the last known location, but this can often be counter-productive). It's also bad for dogfighters who lose track of their targets, especially when you have a faster fighter trying to take down a slower bomber. You really need reasonable LOS for those aircraft to perform reliably.
Its probably worthwhile to include unarmed, durable radar/recon planes that you can send with your force.

Only one plane in 20 chugging CPU with massive LoS is a lot less significant than every single one chugging CPU with massive LoS.
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Re: Why does air cause lag?

Post by Warlord Zsinj »

That's a good point, but annoying that we'd be forced into that.

It'd be annoying to have the dogfighting capability of a whole airforce reduced simply because your spotter aircraft was the unlucky one that the ground aa targetted first. It just makes aircraft use unpredictable.
User avatar
Evil4Zerggin
Posts: 557
Joined: 16 May 2007, 06:34

Re: Why does air cause lag?

Post by Evil4Zerggin »

Aren't armed units auto-targeted first?
User avatar
SwiftSpear
Classic Community Lead
Posts: 7287
Joined: 12 Aug 2005, 09:29

Re: Why does air cause lag?

Post by SwiftSpear »

Evil4Zerggin wrote:Aren't armed units auto-targeted first?
Yes, but only if there are more than 1 unit in range already. The first unit that entered range must be killed before another unit is targeted. So basically, you just need to make your scouts fly in front and they will take the first wave of attacks... at least until they are dead.
Saktoth
Zero-K Developer
Posts: 2665
Joined: 28 Nov 2006, 13:22

Re: Why does air cause lag?

Post by Saktoth »

Is this LoS issue present with radar also? Doesnt radar use a lower resolution, and thus presumably you can make it reach further before you get this lag?

If so, you could get rid of radar hover (through lots of targeting upgrades if there is no other way?) and put radar on all planes- though it means you'd be fighting radar blobs which is 'less cool'.

Alternatively you could lower the resolution LoS in general, im sure that'd help to.

In the end though these are workarounds to an issue that should be fixed engine-side.
Post Reply

Return to “General Discussion”