Physics – a lesson learned

Physics was going great.  We got everything loading, were able to see it loading properly with Sharp DX 11, and were excited to be making great progress.  We knew it was a risk to use an engine instead of copying the internal physics to the game.  We had server-side motion incremental motion mirroring and could have even done some client position validation rather easily.

Then we wanted to add movement mirroring over and around static objects.  This was for 2 purposes.  The larger purpose was so that we could “move” things on the server.  Mainly, monsters.  This requires being able to move stuff over objects (cell data) on the ground.  This is mainly stuff like tables and chairs, but includes ramps and places in the world where there is more than 1 place you can be, vertically, for the same x and y values.  Bullet failed us here.  This required custom placement manipulation.  We were already doing some of that for movement prediction, but that was movement over ground terrain.

Without fully implementing this movement over stuff, we realized that the only way we could really utilize a third party physics engine was for collision detection.  But even then, it was a half-solution.  We have to do collision detection for moving over/around cell objects anyway.  Bullet doesn’t even get us that.

So, we’re cutting bait on using Bullet as a physics engine.  We will continue to use it for the ability to see what’s going on in the engine we’ll end up rolling by hand and utilize the SharpDx11 stuff we already have to render it.  This is still a great tool, we just can’t use it in the way we had hoped.

That said, we’re going to go as far as making portals work on the old system.  Projectiles and server object pathing will have to wait for the new system to get put into place.

-Behemoth

Leave a Reply

Your email address will not be published. Required fields are marked *