| « carving on | Diamond Hunter 6000 » |
XRhodes collision detection demo (updated)
The amount of refactoring the collision detection subsystem needed was beyond expectations. The saddest part of the process was when I realized that only the slightest of changes was necessary to the Collider class itself.

Follow up:
And definitely not that negative sign that I optimized out, then spent half a day hunting down...
Now if you remember, the heart of the problem was that the shapes used by the avatars and renderees may be constant; a part of a resource (Texture or Sprite). The idea was that the shapes will not change; they'll get passed along their LinearTransformation object which expresses scaling and rotation, and the collider is going to calculate the transformed shapes, which in turn will be used for collision detection. The problem was the incredible performance hit and that these temporary shapes would have been calculated on each test, which is just wrong.
The solution thus is that the vertex data gets exported (also transformed), once each frame, then these exports can be tested against each other. This is sleek.
There's still need for a broad phase system, which probably won't be a part of XRhodes due to how the broad phase testing depends even more on what exactly is going on in your game. Time to climb the binary space partitioning tree, I guess?
Anyhow ladies and mans, your demo is downloadable from our favorite file hosting service. For now it's only OSX. I'm gonna be much more willing to boot into windows tomorrow.
OSX:![]() |
WIN32
|
PS, it might be worth mentioning that the FPS values always plummet with the launch of Grab; the demo can do around 1300-1400 frames windowed and above 1700 in full screen mode.

