Page 1 of 1

Help me choose a physics engine / wrapper for a car game

Posted: Fri Oct 22, 2010 7:58 am
by personoid
Help!

I need some help choosing a physics engine / wrapper for Irrlicht.
I want it to make a simple car driving game.

I have some experience with driving games - in face I had one published on the original Playstation.

Clearly there are plenty of physics engine with wrappers for Irrlicht, as seen here:
http://www.irrlicht3d.org/wiki/index.ph ... sLibraries
In fact that is the problem , there are so many to choose from!
I've downloaded a few of them , but I'm having difficulty in finding one that meets my requirements. None of the ones I've seen have a good demo of a car simulation integrated with Irrlicht.

I'd appreciate some reccomendations.

My requirements are:
- A physics engine with Irrlich wrapper / integration.
- Must have good car / vehicle simulation, with a good tutorial / example demonstrating it.
- Must be free / open source.
- Must work with Microsoft Visual C++ 2008 express edition
- Must work reasonanbly well on my laptop, a Toshiba Satelite dual core 1.6Ghz, with Mobile Intel 945 Express chipset, and 2.5GB of RAM.

The sort of game I'm aiming to make is something with 5-10 cars driving a simple track /landscape , with some simple AI.
The car physics model car be reasonably simple , although I wouldn't mind if it is more realistic.

Alternatively, if someone has their own simple-ish car project, with source available, that I could take a look at, I'd greatly appreciate it.

Any help appreciated!

Thanks
Personoid

Posted: Fri Oct 22, 2010 9:26 am
by CuteAlien
I think for opensource engines you only have the choice between ODE and bullets. Both will work with VisualStudio. I suppose they might have at least simple examples for cars on their homepages, as that is rather often asked for physic engines (and I remember I've seen such an example at least for ODE). So checkout their homepages.

AI is independent of physics engine. It's rather difficult to make a driving AI which does use real physics. It's a lot simpler to move them on some pre-calculated track and only enable physics on collision.

Posted: Fri Oct 22, 2010 10:10 am
by Brainsaw
My IrrOde wrapper has an IrrOdeCar demo which includes 3 different types of cars (it does also include a tank, a helicopter and an airplane btw). I am currently working hard to get the "simple car" better. There is a new version on sourceforge that is not yet uploaded in a release package.

I am still having problems with inaccuracy in the calculations that make the rear wheels go crazy, but I do have some ideas on how to fix that ... I'll just have to try those out (e.g. switching ODE to doulbe precision).

The demo runs well on my Core2Duo notebook with Intel GMA4500 (I think) graphics chip, but it doesn't have any cool looking graphics effects - it's just a tech-demo.

Maybe you could give it a try.

The simple car with added suspension is the way to go in this demo. The other two cars are OK, but they are way more complicated and bring some strange behavior sometimes, e.g. if a collision with another dynamic object happens both objects will completely go mad.

Posted: Fri Oct 22, 2010 3:31 pm
by freetimecoder
Hi,

Newton is not open source, but free.
I made a simple car test a while ago
Image
http://www.file-upload.net/download-291 ... r.zip.html

The code structure is terrible but it only uses the newton physics commands. I now use it mixed with my own functions, that is why this test has not been developed further.

I compiled it using CodeBlocks but it should be portable to VC++. Besides Newton and Irrlicht I also use the irrNewt wrapper.

Newton 1.53 that is..

greetings

Posted: Sat Oct 23, 2010 8:24 am
by personoid
Brainsaw,
Thanks , I'll try that. Does it have a working car model with simple suspension?

Personoid

Posted: Sat Oct 23, 2010 8:26 am
by personoid
Freetimecoder,
Thanks very much, I'll try that.
Personoid.

Posted: Mon Oct 25, 2010 5:50 am
by Brainsaw
If you check the version from sourceforge there is a simple suspension added to the simple car model. It's not (yet) in the official release (I guess I'd have to upload a new version of that ;) ).

Posted: Mon Oct 25, 2010 3:13 pm
by 3DModelerMan
I like Bullet because you get soft bodies, and cloth, along with the rigid body sim. It has car physics. The nice thing about Bullet is the motion states, I don't know if there's anything similar in other physics engines? But I couldn't find anything like them in Havok while I was using it.

Posted: Tue Oct 26, 2010 8:15 am
by personoid
Actually, I've had some success with the ca demo in this thread:
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=36237

I'be been able to get it compiling and running with the latest versions of Bullet and Irrlicht.

But other sugestions are welcome.

Thanks

Personoid.

Physics

Posted: Mon Nov 01, 2010 5:43 am
by Birdman
I really like Newton Physics, i saw some demos of Raycast Cars.

Is there some sample arround about using Irrlicht and Raycast Car in newton?

I been inspecting the 203 sample from Newton, but it seems to be using newton more directly (instead of linking newton.dll), and i didnt found any demos for irr reflecting that.

Any help will be appreciated, thanks a lot in advance.

Edit: I been trying for a while to convert 203 sample to irr, im almost done now (just need to create the raycastcar), i used this tutorial as help http://www.newtondynamics.com/wiki/inde ... utorial%29
.

Posted: Fri Nov 05, 2010 8:21 pm
by personoid
Birdman,
That sounds like a great project.
Which are the Newton Raycastcar demos you saw?
Perhaps we could collaborate.

Personoid.

Posted: Mon Nov 08, 2010 3:23 pm
by Birdman
The 203 tutorial for Raycast car is in the wiki.

http://www.newtondynamics.com/downloads ... orials.rar

I was able to mount a car, with physics for its Body, and Floor, but i still wasnt able to make the tires work, i have to check again this week.

Posted: Sun Nov 28, 2010 9:24 am
by pippy3
I wound up with a list like OPs, and chose between ODE and bullet. Bullet ended up being the far more enjoyable to program in of the two:

Image