Physics engine

As I was play testing Iteration 4, I watched as a large carrier turned maneuvered. Problem was that the large carrier was able to stop turning instantly. This is not the type of space sim I want to make. Don’t get me wrong I don’t want the ships to be sliding left and right either, hard to maneuver, but I want there to be some weight to them. I’ve been planning on fully integrating the Bullet physics engine for a while and started down this path again (I gave up many times).

The last attempt of me doing this resulted in a hybrid system, I would position and orient my ships manually, but when a collision happened I would give the physics engine control which would then show a dynamic collision. Problem was that doing things this way severely limited the physics engine’s understanding of the situation, because it didn’t know about the linear and angular velocity of the objects, the collision wasn’t dynamic. I would limit the physics engine control over the object for a split second because if the physics engine had control then the player wouldn’t, so I limited this to the point of impact and a few moments after, meaning that the collision would start abruptly, then stop abruptly, no fluidity. Plus the ship’s momentum wasn’t impacted by the collision.

Anyways the above system gave me more then I had before so I was fairly happy with it. But now I have a much more integrated system, now I don’t rotate an object, I apply a angular force to it, I don’t move a ship, I apply a linear force to it.

Here’s a before and after video showing the same collision happen in the two modes:

The change is subtle, but the after is more fluid and dynamic, and best of all the player has some degree of control at all times. What is left is for me to teach the AI how to maneuver with this new system in place as well. Hopefuly the benefits here will also be neat.