Author Topic: Relative Collision Elasticity  (Read 3403 times)

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
Relative Collision Elasticity
« on: May 30, 2008, 12:52:25 AM »
I think that the bounce force of when a bot collides to another bot should be influenced by shell (which makes the bot more bouncy) and slime (which makes the bot sticky).  
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Relative Collision Elasticity
« Reply #1 on: May 30, 2008, 03:19:27 AM »
The physics engine for the current program isn't really robust enough to seriously play around with fun things like elasticity.  DB3 should be, though, so I can make a mental note of it

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
Relative Collision Elasticity
« Reply #2 on: May 30, 2008, 04:48:19 AM »
I was not really meaning elastics, more the way they bounce off other bots. Shouldn't really be too hard, just multiply movement vectors by a value relative to global elasticity, shell and slime levels of both bots. Of course, any harder and it wouldn't be realistic to implement it.
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Relative Collision Elasticity
« Reply #3 on: May 30, 2008, 01:25:34 PM »
No, I mean that the way collisions are handled is extremely temperamental.  Basically the two bots are allowed to intersect, and then a force is applied to both to move them apart.  If you were to run some quick tests in the program, between colliding bots, I think you would see some very different behaviors under exactly the same conditions.  The amount of "bounce" between two bots is a factor of how far they managed to interpenetrate the previous cycle.  The force applied is extremely picky about how strong or weak it can be.  If it gets outside its "sweet spot", the whole simulation basically can explode in a chain reaction.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Relative Collision Elasticity
« Reply #4 on: May 30, 2008, 02:05:41 PM »
Actually, I cleaned this up quite a bit a while back when I made the coeffecient of elasticity work properly.  We're coverred I think as long as the coeffecient remains below 1.  If it goes larger than 1, collisions can provide more rebound energy then was involved in the original collision and you get flubber.

I actually think it would be pretty simple in the current code to have a checkbox mode where the elasticity of collisions was based on the substances of the bots involved instead of by the slider control.   For example, bots with lots of shell could have a coeffecient close to 1 and bounce liek marbles.  Bots with less would act more like ghosts and deflect less or even pass right through each other.   This would be easy.  

Enabling inelastic (I.e. sticky) collisions however, would involve authorring new physics routines and bring into play concepts that arn't fully baked at the moment such as angular momentum.  Harder to impliment, but certainly not impossible.
Many beers....

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
Relative Collision Elasticity
« Reply #5 on: May 30, 2008, 03:45:28 PM »
At the moment, I was more thinking that a bot with tons of slime would just stop moving when it hits or gets hit by something, like a big round cushion.
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan