Third game made: TBD

Physics

The physics engine handles collision detection and Newtonian physics. So far, I have done very little in terms of collision detection. But, in a previous game I've implemented the collision detection code that can probably be used here. The rigid body simulation portion of the physics engine has already been implemented. Although it's in a very early stage of development. But, depending on the needs of a particular game design, it may suffice.

The Newtonian physics implemented so far is very simple. Given a particular simulation, the application calculates the forces acted upon a rigid body. The forces are then fed into the physics engine. Per game loop, the following is then calculated per rigid body

1. Linear and angular momentum

2. Linear and angular velocity

3. Rotation and translation based on linear and angular velocity.

So basically, the only real work is computing the forces, and that's application specific. Here's a short video of a spring-mass-dampen system. In the video, forces are changed at run time by adjusting the spring and damper coefficients. It's actually pretty boring.

 

 

Contact Me

Hosted by www.Geocities.ws

1