Bullet Physics engine

Started by abcdef, May 08, 2014, 16:28:29

Previous topic - Next topic



This has probably come up before but I wanted to see what the current sentiment is, do people think a physics library should be incorporated in to LWJGL?

Like we have bindings for opengl, opencl etc do people think we should have bindings for the Bullet library? There is of course JBullet that is out there, but this doesn't seem up to date and doesn't seem like its being worked on (This would be my default backup if nothing happens here). It is also a port in to pure java and not a set of bindings (LWJGL seems to be bindings based too so I don't know the thoughts on a JBullet integration).

I am at the stage in my pet project that I want to implement some of the basic features of a physics library (and later more advanced features) so was going to offer some help in this area in creating something if this is what people want.




I know about the libgdx and Java Monkey engine bindings but I don't want to use a graphics engine if possible. I was just checking if LWJGL had plans to do it because I'd prefer the light weight library approach. The alternatives are I can port the bits over that I want or I can use JBullet.

I am just exploring the options at the moment  :)


Isnt that completely contradicting? You want a lightweight library but you want it to include a bullet engine which is only going to be useful for a few members?
Thats not lightweight by my definition.


Lightweight = not part of a full blown game engine implementation
Lightweight = having bindings to what is considered standard in the opensource community the defacto physics engine (some might disagree with this)

Most people creating games need sound, graphics, controls (mouse / keyboard etc) and more recently it has become important to have the ability to have a physics library. LWJGL has the first 3 currently.

You are right that not everyone would want a physics library, you have made it clear you are one of them. I was only asking the question if having some sort of physics library in LWJGL was in the plan. If it isn't I will not bother the community here further. If it is I was offering to help.


Don't think there would be any harm in having a bindings in LWJGL for other native libraries (e.g. Bullet). In fact LWJGL3 is even designed to allow this sort of stuff.

However as mentioned above LibGDX already has pretty good bindings for Bullet and Box2D. Do note that these LibGDX bindings can be used standalone from the main library so you don't need to use the graphics engine of LibGDX, I've seen a few other java game engines/libraries using them for physics.


That is true, we're sure open to adding more useful bindings to LWJGL 3. Example libraries would be libffi (already implemented), physics libraries, video decoding libraries (libVLC/ffmpeg), etc. The plan is to make the build system modular, so that developers will be able to build and ship only the bindings used in their application. Adding support for a library only useful to a small portion of LWJGL users, will not be an issue.

With that said, there's no point in duplicating effort. If the libgdx bindings can be used standalone, without any dependencies to the libgdx framework, it's a good reason to not go through the effort of adding Bullet support to LWJGL. Another problem is that Bullet is a C++ library and that means the LWJGL3 bindings generator cannot be used (at the moment at least).