Chain-collisions

Chain-collisions

Requests for features in the spring code.

Moderator: Moderators

Saktoth
Zero-K Developer
Posts: 2665
Joined: 28 Nov 2006, 13:22

Chain-collisions

Post by Saktoth »

When effected by impulse, tightly packed units often explode with far more impulse than was applied to them. It seems that Spring isnt exactly obeying the laws of conservation of momentum here!

See this very old thread.

Not exactly sure what the nature of the problem is, it looks something like the net impulse increases when two bodies hit eachother, more collisions creating more impusle until you get something like this:
Image
Image
Image
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: Chain-collisions

Post by Regret »

Bets are it happens because of the hitspheres getting stuck in each other resulting in huge acceleration from every moment they remain stuck.
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Re: Chain-collisions

Post by Neddie »

Regret wrote:Bets are it happens because of the hitspheres getting stuck in each other resulting in huge acceleration from every moment they remain stuck.
Damn you, you beat me to it.
Saktoth
Zero-K Developer
Posts: 2665
Joined: 28 Nov 2006, 13:22

Re: Chain-collisions

Post by Saktoth »

This is what i always thought, yes. If it is indeed true that units inside eachothers hitspheres apply more impulse than the net amount in the system that should probably be fixed- a much milder amount of impulse will be enough to 'bounce' them apart (and prevent them ending up inside eachother) without making them explode like that.

But try a unit with a footprint slightly larger than its hitsphere. It still tends to bounce way more than it should and do the exploding like a bunch of firecrackers thing.

A unit with a footprint twice as large as its hitsphere doesnt seem to suffer from this so much, but that may be because collisions are just much less likely (Its not practical to do this anyway so its not a good workaround).
User avatar
Tribulex
A.N.T.S. Developer
Posts: 1894
Joined: 26 Sep 2009, 21:26

Re: Chain-collisions

Post by Tribulex »

Whats the problem here? I find this new physics model rather... enticing, to say the least.
User avatar
Rafal99
Posts: 162
Joined: 14 Jan 2006, 04:09

Re: Chain-collisions

Post by Rafal99 »

I have tested it yesterday as well. The bug is as old as Spring itself.

Normally when a cluster of units is hit by impulse weapon, some of them start moving/flying slowly, hit each other, but after a quick moment they all stop. But there is a bug and it seems that sometimes some random unit gets some random insane velocity after colliding with the other, even that none of them had a high velocity before the collision. When it gets such a velocity, it hits another unit, bounces, hits another etc, until the whole cluster of units is flying everywhere or is dead because of collision damage.

It also seems that this bug happens only when colliding units are overlapping their hitspheres, for example when you /cheat /give 100 cans (they have a hitsphere larger then a footprint). If you spawn 100 stumpies they don't overlap their hitspheres, and from tests it seems the bug won't occur. Note that the whole situation doesn't happen only when you /cheat /give a cluster of units, but I have observed it many times in normal games, when a tightly packed group of units gets hit by an impulse weapon, and they all start flying with absurd speed, while a single unit will never behave this way.

I will test it further, and maybe upload a replay later.

PS. It should be in Bugs forum imho, but more people read this forum so it is even better. ;)
Saktoth
Zero-K Developer
Posts: 2665
Joined: 28 Nov 2006, 13:22

Re: Chain-collisions

Post by Saktoth »

I assume you're testing in CA, since stumpies hitspheres overlap in BA.

They do the chain-collide explosion thing too though. Try 100 stumpies vs a corgrav (newton). They fly everywhere instantly.

So its not just a hitsphere-larger-than-footprint thing.

Could it possibly just be a conservation of momentum thing? That when two objects strike eachother, the momentum in the system increases?
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Re: Chain-collisions

Post by 1v0ry_k1ng »

I always liked this bug :P
User avatar
Wombat
Posts: 3379
Joined: 15 Dec 2008, 15:53

Re: Chain-collisions

Post by Wombat »

in ba i made once 300 zipps and packed them terribly, so 3/4 of them blew up without any reason.

i had theory that coz of stacking them so much, they started to behave like units threw in the air and hitting ground (i think its same situation)
zerver
Spring Developer
Posts: 1358
Joined: 16 Dec 2006, 20:59

Re: Chain-collisions

Post by zerver »

this bug is good because it has porc reducing properties
SirMaverick
Posts: 834
Joined: 19 May 2009, 21:10

Re: Chain-collisions

Post by SirMaverick »

zerver wrote:this bug is good because it has porc reducing properties
The porcer does not have many (mobile) units, the attacker does. This bug punishes the players with many mobile units.
Normally the attacker sends his army, they are send together, not one by one. But that may trigger the bug. So you can either send them one by one or get them distributed over the map.

How does this reduce porcing?
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Chain-collisions

Post by smoth »

this bug is one of the reasons I removed impulse.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Chain-collisions

Post by Forboding Angel »

smoth wrote:this bug is one of the reasons I removed impulse.
Same.
Saktoth
Zero-K Developer
Posts: 2665
Joined: 28 Nov 2006, 13:22

Re: Chain-collisions

Post by Saktoth »

Its why AA removed impulse too, i wouldnt be surprised if its the reason why CA is the only mod AFAIK that uses impulse extensively.

So, basically, this single bug breaks the entire unit collision physics system and renders it unusable.
Umbra
Posts: 46
Joined: 29 Jul 2009, 14:23

Re: Chain-collisions

Post by Umbra »

Why are all the best bugs only in games and not in RL? Think of all the traffic jams that could be avoided if everyone feared being flung hundreds of feet into the air!

Randomness aside, wouldn't it be possible to set up some special logic that would dampen the effects of this bug, so that instead of being flung to oblivion, they would merely get shoved aside?
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Chain-collisions

Post by Tobi »

I'd much rather see a proper fix and/or change to Verlet integration then even more hacks.
Umbra
Posts: 46
Joined: 29 Jul 2009, 14:23

Re: Chain-collisions

Post by Umbra »

A proper fix may take time to implement. I would rather see a hack that limits this bug in the next release, then waiting five for a full fix or switch to a completely different system.

So unless my hack isn't as simple and as fast as I believe it to be, or the genuine fix won't in fact take as long as it is made out to be, perhaps there should be a slight bit more consideration in my idea.

That aside, how much coding and time would verlet integration take? And what level of skill would be required?
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: Chain-collisions

Post by KDR_11k »

I'd rather kick impulse out of the engine and have people lua it because having units go flying rigidly and with little gravity fits into almost no mod.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Chain-collisions

Post by lurker »

They use the same gravity as projectiles and everything else.
If you want them to fall faster you could use mygravity.
From what I've seen collisions are actually far too elastic. Unless that's what you meant by rigid. Yes, should be less of that.

The issue is just in how impulse is calculated some of the time.
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: Chain-collisions

Post by Google_Frog »

KDR_11k wrote:I'd rather kick impulse out of the engine and have people lua it because having units go flying rigidly and with little gravity fits into almost no mod.
unitCannon.PNG
unitCannon.PNG (246.09 KiB) Viewed 1879 times
Post Reply

Return to “Feature Requests”