jiggly/unstable particles on line surfaces

BlitzMax Forums/BlitzMax Programming/jiggly/unstable particles on line surfaces

dXter(Posted 2007) [#1]
Hi, i'm trying to modify FLADE (flash dynamics engine) to have circle-to-circle collisions, but I'm having some trouble. I didn't want to use flash at all, so I'm using a BlitzMax port of flade, located at www.doozey.com/downloads/flade_06a_bmx.zip. Ok, so I implemented a circle vs circle collision algorithm i found at http://www.blitzbasic.com/Community/posts.php?topic=55823 (the code i used was the lower one, submitted by Jim Brown)
The problem is that if i place many circles above an incline beside a wall, making them pile up, the weight of the circles pushes the bottom ones more or less into the ground, which sometimes makes a kind of "explosive" effect that sends one of the circles on the bottom shooting up very fast. Is this natural or can it be fixed? Does it have something to do with the fact that Flade uses a velocity-less implementation for particles? (i.e. it stores the current position and the previous position and figures the velocity from that). Thanks for any help u can give.


Jake L.(Posted 2007) [#2]
Hi there,

i don't know the systems you speak about, but you could implement damping and a "rest mode" when your circles move slower than a given speed. This will make them more stable. Once rested(disabled), reactivate them only when measurable forces are applied to them.


dXter(Posted 2007) [#3]
Ok i think i pretty much fixed it now. I changed the system to include velocity, and for some reason that makes it a lot more stable and realistic-feeling, although it still acts a little strange when i pot *lots* of heavy circles on top of each other. Jake, the rest mode idea would be great for even more stability. I've already included damping, and that helps a lot too.