I can be so indecisive sometimes

For my game asteroid wars I had written my own basic physics engine for the server that knew about acceleration, torque lateral velocity, lateral momentum, angular velocity and angular momentum and did both Axis Aligned and Object Orientated collision using the main quad-tree that everything else used for broad phase.

Then I decided that it would be better to use the PhysX library as it should be both faster and more accurate…

Of course it used floats and I am using doubles everywhere else in the server code so I had to create a grid of simulation scenes and pass objects between them to get anything like the same map size I had with my old system, and after all that it ran marginally slower (since most of my objects are in constant motion with changing velocities but rarely collide), this is when I started to think that a full blown physics engine like PhysX was in fact over-kill for what I wanted.

And it was quite messy to get it in there (used the PhysX Candy Wrapper with my custom math library) but the PhysX binaries didn’t want to seem to play ball running on Linux under mono (where as my custom managed library did obviously)

So now I have striped it all out and put back all my stuff and I am back to running upto 8,000 mobile objects in the same scene/thread using double precision. (So I should still have some gains to go yet when I multi-thread the physics later) 

Anyway, that seemed like a huge waste of time, but at-least I am more familiar with the PhysX API and its limitations now.

I need to continue my port of the ‘AI Steer’ library now…
Or maybe I should start making it look more like a game, I can never tell when to stop building architecture and when to start filling in content. 

9 February 2011 ·

1 note

  1. dbennell posted this

About Me

Flickr Images