Physics engine for car racing

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
Oruchiku
Posts: 3
Joined: Sun Nov 30, 2008 7:12 am
Location: .lodz.pl

Physics engine for car racing

Post by Oruchiku »

Which one to choose? Newton seems natural choice, mostly due to few wrappers available (IrrNewt, IPhysics) but lacks support for vehicles other than rear wheel drive - well, it might be worked around but I don't really feel like doing such hacks..
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Check out Physx, i'm sure it would be up to the job. There's my IrrPhysx wrapper available but it won't be supporting vehicle stuff for a while i should think, though you could inspect my IrrPhysx code to see how i've integrated Physx with Irrlicht.

Havok might be good to look at too, they're both free now (at least for non commercial anyway, you might want to check that with Havok if you plan to release your game commercially).

Both Havok and Physx are good because they're of commercial quality and have large teams behind them!
Image Image Image
maroxe
Posts: 51
Joined: Wed Dec 10, 2008 1:52 pm

Post by maroxe »

what about ode?
xsocom
Posts: 80
Joined: Thu Sep 13, 2007 8:34 am

Post by xsocom »

Go for newton.
Brainsaw
Posts: 1183
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

ODE can surely do it. I am trying to get some ODE code up and running (although my first Irrlicht game "Marbles" (http://dustbin-online.de/marbles.php) is using ODE I decided to completely redo the ODE stuff to get a better integration. I just don't find much time currently to work on it, but I will post it as soon as I have some result.

Check out the ODE demos on their homepage, there is a car demo. And in the package some car stuff is also included.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
maroxe
Posts: 51
Joined: Wed Dec 10, 2008 1:52 pm

Post by maroxe »

i don't know why both newton and ode use C programming style even if they are c++ libraries :(
Brainsaw
Posts: 1183
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

ODE is internally done in C++ (at least that's what they say ... haven't taken a look at that, but you could), but it uses a C interface to make it more portable.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
maroxe
Posts: 51
Joined: Wed Dec 10, 2008 1:52 pm

Post by maroxe »

Brainsaw wrote:ODE is internally done in C++ (at least that's what they say ... haven't taken a look at that, but you could), but it uses a C interface to make it more portable.
can we use C++ in a C program?
Brainsaw
Posts: 1183
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

I think so (haven't tried). Maybe you should take a look at the forums on http://opende.sourceforge.net, they might be able to help you there.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
DeM0nFiRe
Posts: 117
Joined: Thu Oct 16, 2008 11:59 pm

Post by DeM0nFiRe »

This may sound like I'm being a jerk, but it's a serious question:

Could you not just make the rear wheel drive car drive backwards for front wheel drive? How much control do you have over weight distribution etc.?
Halifax
Posts: 1424
Joined: Sun Apr 29, 2007 10:40 pm
Location: $9D95

Post by Halifax »

maroxe wrote:
Brainsaw wrote:ODE is internally done in C++ (at least that's what they say ... haven't taken a look at that, but you could), but it uses a C interface to make it more portable.
can we use C++ in a C program?
No, C++ is an extension of C. That is why it is sensible for C++ to support C programming. C is not a derivation of C++, therefore no support for C++, as there should be none. If C did support C++ compiling, than the language would simply be a C++ remake.
TheQuestion = 2B || !2B
Dorth
Posts: 931
Joined: Sat May 26, 2007 11:03 pm

Post by Dorth »

BUT c++ can be used with a c app by exporting the function names in c format and building a c compatible library. Browse a bit on the web how to do that.
maroxe
Posts: 51
Joined: Wed Dec 10, 2008 1:52 pm

Post by maroxe »

yeah, i used to use SDL wich is a C library in C++ program.
C can be warped in many other programming lagaguages, and it's one of its advantages.
by the way, there is a warpe of ode in C++ (take a look at odecpp.h & odecpp_include.h)
also, read this: http://groups.google.com/group/ode-user ... 30593d1840
Post Reply