Bouncing baby cubes

I’ve been meaning to try my hand at this physics lark for a while. It’s an interesting topic – on the surface it appears to be just a few simple equations, but even the big games manage to get it wrong on occasion.

And when they do get it wrong, it’s usually pretty unpleasant – solid objects slowly disappearing into a solid floor as though it’s quicksand, or two objects colliding and pinging off into orbit. Surely it can’t be that hard…right?

I’ve been throwing together a basic simulation consisting entirely of bouncing cubes…

...pretty, huh? Well, the basic math is there – cubes react properly to each other on collisions – but as you can see there’s still some difficulties with sinking through floors and other less-than-ideal situations. Still working on ironing out the kinks in this one.

· 2004-10-12 ·

  1. is there a way to see your cube animation? — Stefan    May 14, 04:59 PM    #
  2. Man, this error is very common, and the whole matter resides in the form of the flow of the code.. Try to realocate your code, the Physics first, collisions come second, and to finish the process, Draw every cube.. if still keep moving, check the float presicion.. ;) bye! Pablo Manuel Ordoñez    Jun 7, 11:01 AM    #

Commenting is closed for this article.