Which physics engine?

I need a physics engine for my first full game but I don’t know which one to choose. The ideal engine doesn’t have to be very sophisticated, in fact I would prefer a simple one that I can get started with quickly. Major pluses would be documentation or examples/tutorials on the web, small jar size and speed over accuracy.

I looked at JOODE but there were no documentation or docs and it looked a bit incomplete and possibly buggy (I don’t know why but I wasn’t filled with confidence by what was on its website).

Any suggestions?

P.S. - The game is a top down sports sim so i need 3 dimensions and I’ll be dealing mainly with a sphere

Tell you what, try out ODEJava and JOODE; they both use very similar APIs. For JOODE, check the examples. ODEJava is more mature, but JOODE is a pure-Java implementation.

If its spheres on a plane then yes I think JOODE could well fullfil your needs. I am currently trying to write documentation for it at the moment…

If you were choosing jME as scene graph you can use jME Physics 2 which can switch between JOODE and ODE. There are some basic tutorials and a nice community… but you should choose on the scene graph first…

Yeah, Irrisor is right. The physicsy bit is probably the easiest bit. To use JOODE or odejava you need to connect them to the graphics engine which will probably be quite game specific. You need to understand your graphics engine first.

Just for cmpleteness: Have a look at Xith3D, too. It is a nice, fast and feature-rich scenegraph implementation. We are working on a Physics abstraction, too, that is capable of switching between arbitrary physics engines (like JOODE and ODEJava). We even have very good documentation.

Marvin

Personally I’d advise you the Xith3D+JOODE couple. I won’t dissert on why Xith3D and not jME/Java3D but know it’s a viable alternative. About ODEJava vs JOODE, true ODEJava is more mature but also you sometime experience unforeseeable bugs for no particular reason (hardly debuggable, since it’s a JNI binding of ODE).

But in the end, all advice in the world can’t replace testing… so go on and test some solutions, stick on whatever feel most comfortable for you…

Thanks for the quick replys everyone.

I guess I didn’t give enough information in my original post (sorry bout that) so I’ll try and clear up everything:

a) I will need 3 dimensions but the game is done in 2D, with the X and Y axies representing left/right and backwards/forwards respectively, up and down being represented by going in and out of the screen i.e. faked by moving shadows - however the calculations are done as normal. So I won’t be needing any scene-graph or anything like that. In short the game is 2D not 3D.

b) I’ve pretty much ruled out ODEJava because as a noob some unexplainable error (that’s not even my fault) might be too much for me to recover from and I really want something that’s all Java.

c) Is there anywhere I can just get the JOODE JAR because I have no idea how to use subversion (even though I really should by now), ahem!! :-[

That should be about it (for now) , thanks!!

Yeah I will setup a link on the website … pending (shell sccess down at sourceforge, but ready to deploy)

If the physics are 2d, you could give phys2d (http://www.cokeandcode.com/phys2d/) a try, its quite basic. However there is no other documentation than the comments that go with the code and consequently javadoc documentation. No tutorials whatsoever. There are a lot of demos that should get you started though.

OK. Finally up:-
http://joode.sourceforge.net/download.html