Bepu suitable for simple physics?

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
Shackleford
Posts: 1
Joined: Sun Aug 19, 2012 6:12 pm

Bepu suitable for simple physics?

Post by Shackleford »

Greetings, I'm considering moving my 3D roguelike from my ham-fisted homemade physics to something more... not terrible :)

Is Bepu suitable for extremely simple physics(e.g, currently all I do is just check if bounding boxes overlap and check whether they're on the ground or not and apply gravity if they aren't. Zero rigidbodies, ragdolls, joints, anything fancy, etc)?

I want to move because I know eventually I'll start getting terrible performance from my physics implementation as I plan on making the worlds in my game much larger.

Also, the documentation on this library far exceeds any other C# physics library, bravo.
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Bepu suitable for simple physics?

Post by Norbo »

It can certainly simulate simple physics, but it does so by controlling degrees of freedom rather than removing them from consideration entirely. So, even if all dynamic objects are axis aligned bounding boxes, the physics representation will still be a full rigid body. (Probably a Box with its rotation locked by setting the entity.LocalInertiaTensorInverse to all zeroes, corresponding to effectively infinite inertia.)

Every system in the engine assumes all those degrees of freedom can potentially exist, so it does the work to handle them even when the actual simulation only has axis aligned bounding boxes in it. Because of this generality, a fully optimized specialized system designed to handle only axis aligned bounding boxes (or other very specific, simple configurations) will necessarily be faster than BEPUphysics. That said, BEPUphysics will likely end up faster than many specialized implementations that aren't yet fully optimized.

So yes, I'd say it would be suitable. Depending on the specific needs, you may find something like the simpler BoxCollider library from the xna Ship Game sample more suitable, but I am not sure what features it provides.
Post Reply