Not Big Enough I Say!

I did it again, as I was driving home in my car I wondered why the hugest of the asteroids in my clone of the Atari Asteroids Game from 1979 not just pushed the smaller Asteriods out of the way on impact, I had a revelation!

The mass of an Asteriod is not based of a one dimensional diameter length like metric or a two dimensional area like metric for that matter. Mass is mass and it is volume based, so away I went an added a cubicSize member to my asteroid class which is size*size*size, where size is the diameter of the smallest circle surrounding the center of mass of the asteroid. And behold it looks more like the effect i was after, try it out:

https://schwartzengine.com/AsteroidClone/index.html

What a bummer! Using a one dimensional measure for volume, I must have been to eager to see the results of the collision algorithm when I implemented it. A typical trait when you make graphical software. It also goes to show that the human mind works in mysterious ways when it comes to trouble shooting and problem solving 🙂

Software development is still a young craft and not easy 😉