A classic Mistake!

I just implemented a classic elastic collision formula to get a semi realistic collision modeling amongst the asteroids in my take of the 1979 Asteroids game.


This is the formula where the u vectors are the speeds before the collision, the v vectors the speeds after the collision and the m numbers are the masses.

I had implemented this correctly, but just made a tiny little mistake, the distance needed between two objects for them not to touch was calculated a little to small, causing the asteroids to linger almost on top of each other when colliding. After fixing this it looks a little better. Try it out HERE! 🙂

Author: Carsten Schwartz

My name is Carsten Schwartz. I live in Stevnstrup, Denmark . I develop Apps and Computer Games. I play board games and I am an experienced GM in Warhammer Fantasy Role Play (1st and 2nd Ed). I am also painting and sculpting miniatures. Yes that's right I am a freak - No mistake there, I even exercise Ju-Jitsu twice a week too. I am using this media to track my work and organize it a little.

Leave a Reply

Your email address will not be published. Required fields are marked *