Trying to understand the physics engine options

Post your questions, suggestions and experiences regarding game design, integration of external libraries here. For irrEdit, irrXML and irrKlang, see the
ambiera forums
Post Reply
opticdrive
Posts: 7
Joined: Sun Jul 01, 2012 5:27 am

Trying to understand the physics engine options

Post by opticdrive »

I was wondering what peoples preferences for their physics engine were and why? I have been reading about Tokamak (http://www.tokamakphysics.com),Newton (http://newtondynamics.com/forum/newton.php),Bullet(http://bulletphysics.org/wordpress/) and ODE (http://www.ode.org/) but I don't understand their pros/cons. This has lead me to look into PAL (http://www.adrianboeing.com/pal/index.html) too, but I can't figure out if this would leave me without useful features down the line if I choose to go with PAL. Any and all help would be much appreciated.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Trying to understand the physics engine options

Post by CuteAlien »

Pro for Bullet and ODE - they are opensource and have liberal licenses (similar to Irrlicht). Otherwise they are probably all fine unless you have very specific needs. If you have those you should look at the documentation if whatever you want is supported.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
opticdrive
Posts: 7
Joined: Sun Jul 01, 2012 5:27 am

Re: Trying to understand the physics engine options

Post by opticdrive »

My needs I believe are:
  • Lots of blocks/rocks/objects that can be hit, but hidden until an event - such as getting hit really hard for breakable walls
  • wheels and axil
  • Some ability to pull off a wind look for tree branches and leafs
  • It would be really awesome if the was something for fabric too
  • Dent-able surface?
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Trying to understand the physics engine options

Post by CuteAlien »

- Hiding objects is something you code.
- Breakable walls could be tricky as it's not just a physics problem but also a graphicial problem (as 3d objects are empty - they don't have cutting edges when you split them). Often people use particles for that or just create several objects and replace the hit object by that.
- wheels and axil? I guess it's for a car - there's ways to get that working with all of them.
- Stuff like wind is usually always done with animations (overkill to use phycics for that unless you make a game about trees)
- Fabric needs soft body dynamics. I think Bullet has those, ODE to my knowledge not. Don't know about the others.
- Dent-able surface sounds hard. I think the easiest way to do that is replacing the objects by dented objects when they got hit (typically used in racing games). Although I think it's a feature coming soon (seen something in that direction recently in a preview). But cutting edge stuff - fake it.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
opticdrive
Posts: 7
Joined: Sun Jul 01, 2012 5:27 am

Re: Trying to understand the physics engine options

Post by opticdrive »

Ok, thanks. I guess I will check out the bullet-physics engine then.
Granyte
Posts: 850
Joined: Tue Jan 25, 2011 11:07 pm
Contact:

Re: Trying to understand the physics engine options

Post by Granyte »

Bullet physics has two demo for breakable objects one where you link object with a breakable contrain that will break after a certain amount of force has been aplied.

The other shows how to break object in smaller part using voronoi fracture but you have to code by your self when they break
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Re: Trying to understand the physics engine options

Post by Virion »

usually vehicles are not moved by the wheels. the wheels are just for display purpose. usually they cast 4 rays, 1 on each side of the vehicle to determine the distance it should stay above the ground. wheels just rotate by itself according to the vehicle's velocity and direction.
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Re: Trying to understand the physics engine options

Post by devsh »

go for Bullet

They are about to integrate OpenCL and that will enable you to use the spare GPU on the intel i3,i5,i7 ivy bridge that is just laying there if you have a proper graphics card
Post Reply