Post news RSS Violent Sol Worlds - Physics Progress Report

After some time Violent Sol Worlds has it's new physics engine. We have it in the game and the bouncy problems are all gone. The engine is fast and acts as we need it to. The process was more of an adventure than I had thought though. Come read about it now!

Posted by on

After some time Violent Sol Worlds has it's new physics engine. We have it in the game and the bouncy problems are all gone. The engine is fast and acts as we need it to. The process was more of an adventure than I had thought though.

It turns out that the original POC code had a bug in it that made the sample objects I created work perfectly. Once we ported the engine to the real game that bug was not ported over and the game objects started to act terribly. You could pass through walls in a specific direction and get stuck in the car.

Finding the problem was not fun, it took some time. The problem was that we were doing the math on the center of the image of the object not the center of the physics. This worked well if they both correlated, if they did not we ran into situations that no matter what side you were on of a physics body you looked like you were moving at it from the right. This caused the pass-through situations.

To solve this issue we defined a point that was the center of the body. That point could be anywhere relative to the position of the body to the world so it could be off center of the image that is being displayed. With that fix the math all worked great and everything looked like it was going to fit in the game. So we ported that fix over to the game and that is where we are at.

Physics Bodies With Centers


Here is a simple video showing how it is working. At the end you can see we still have some tunneling issues where lasers pass through walls but that is going to be attacked a different day.


Come check out the game here on IndieDB

On Steam

and on our website - ViolentSol.com

Also stay tuned for a tutorial on how to make this physics happen. I will be releasing the POC code and writing a tutorial on how it was done very soon. Watch the project by clicking here to stay informed.

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.