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 😉

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 *