Quick physics overview

Blitz3D Forums/Blitz3D Userlibs/Quick physics overview

jfk EO-11110(Posted 2007) [#1]
Just to save some newbies a lot of time:

What are the physics libraries for blitz3d, and what are the pros and cons? I'd like to know about:

-complexity
-flexibility
-license issues, $?
-stability
-ease of use

Thank you.


t3K|Mac(Posted 2007) [#2]
i am also interested in this. so could someone be so kind? ;)


Subirenihil(Posted 2007) [#3]
I use Tokomak. It's free, not very complex (any physics get complex fast) and its easy to use. The only draw back I've found is that it does not support cylinders - the closest shape supported is either a custom mesh or a pill kind of shape.


Danny(Posted 2007) [#4]
In General, any physics engine is complex so it will demand some serious dedication and time to get the hang off it.
Also, nearly every engine has problems or quirks you'll have to figure out and live with. No physics engine I know of (that's free!) have all their features working perfectly..

I've spend a lot (a lot!) of time previously using Tokamak and always had trouble with loads of unexpected results and problems (if you go a bit more complex than just tossing cubes around). It was fun working with it but I never thought it predicatble or stable enough to actually release anything serious with it. I wouldn't advise investing your time in an engine that's pretty much dead from a development point of view. As far as I know, Tokamak development has been dead for years now.

I later switched to JV-ODE which is one of the best buys I've ever did!! It's much more stable, easier to use, behaves much more predictable, has more options when it comes to joints and motors. And most importantly, ODE is still being developed and has a very active community! I receive regular updates, and not in the least, vip3r (who made the b3d wrapper for ode) gives superb support and there's few things he can't solve! He only charges the price of a couple pints for his wrapper, so worth every penny!!

hope that helps,
Danny.


Vorderman(Posted 2007) [#5]
Tokamak does cars much better than ODE, despite ODE's built-in carwheel joint - I spent ages writing and working with the original Blitz ODE wrapper and never could achieve a decent vehicle system. In Tokamak I have achieved much better results, partly I think down to the contact friction system, which seems to give less of the "full grip or full slip" problems that you get with ODE.

If you look at almost all ODE vehicle demos they work really well at slow speeds (the carwheel joint suspension system is excellent over bumps) but go a bit faster and you get that inevitable full grip to sudden slide situation. Tokamak seems to provide a much nicer break-away, which means the wheels can slide and grip under the player control, rather than an instant spin as happens in ODE.


Moraldi(Posted 2007) [#6]
All samples of these libraries handles just cubes, spheres and basic primitives, but I didn't see a clear example of how I can interact with my custom b3d files...


jfk EO-11110(Posted 2007) [#7]
I think you best use basic primitives with a minimum of Triangles as a handler for your custom meshes. Probably elias' hull dll may be useful too.

Thanks for your help. Thought there's more than ODE and Tokamak. Wasn't there somthing like Newton, Alephia or so?

I just downloaded BlitzODE latest release lib, I think that's from you Vorderman?

The License of ODE seems to be something GNU like right? As i understand this does allow commercial use?

some better info on the license:
http://en.wikipedia.org/wiki/Open_Dynamics_Engine


Vorderman(Posted 2007) [#8]
No, BlitzODE isn't from me, mine was the really old ODE wrapper from about 5 years ago.


Damien Sturdy(Posted 2007) [#9]

which means the wheels can slide and grip under the player control, rather than an instant spin as happens in ODE.



You do get a spin in ODE when the back wheels become disjointed. It is an inherit flaw in ODE to this day, it has been improved but never removed. It's a shame.

I used Vorderman's ODE In the Car Engine/Fun Racer which I teamed up with Evak for. Many many months went into tweaking ODE and preventing rear wheel slide.

So it is possible to do decent cars at high speed in ODE but the method in which to do it is much much more complicated than it needs to be- I do it by running the physics sumulation twice per update, first at 1.5 speed and then at 0.5 speed, which reduces the effect.

I did however have to calculate what was sliding and when, by myself as as Vorderman says, ODE is either on, or off, but not both.
Tokamak's vehicles can be seen in action in Vorderman's Stunt Car Racer (I think I got that right!).


Vorderman(Posted 2007) [#10]
Yeah, ODE seems to make the sliding wheels thing a real problem, which is a shame as the carwheel joint is excellent for suspension.

I think Racer uses ODE, and they also use a very complex Pacejka (sp???) system to calculate the friction/grip for the tyres.

Tokamak's vehicles can be seen in action in Vorderman's Stunt Car Racer

Yes, that's right, although I've renamed it to Stunt Race Xtreme (which I WILL finish one day). The friction works very well, but the lack of a decent suspension joint makes landings sometimes unpredictable, but I'd rather have the occasional dodgy landing than constant snap sliding and uncontrollable drifting. Depends upon the aim of your game I suppose - a slower 4x4 offroad game would be much better suited to ODE.