The physics engine is particle based, and updates 80 times per second.
Each particle has:
a mass
a location
a velocity
acceleration
An octree was designed and implemented to improve performance, but streamlining the physics functions rendered it unnecessary, as physics test framerates routinely reached 110 fps with 82 bodies on screen (328 particles).
Rotation velocity is not explicitly calculated, but rather is a behavior designed to occur naturally due to the interaction between particles and springs. Due to the implicit nature of rotation in the physics engine, normalized basis vectors can be readily obtained for any given body, and a basis matrix can be formed. This basis matrix allows a rotation of any given polygon mesh to match the orientation of the body in one multmatrixf(float *) function call.
For videos of the game, please visit our YouTube page at:
- http://youtube.com/thebattleroom
- Or go to our Downloads page to view them