gregdavisd / jaxBullet

Java port of Bullet physics 2.86.1
0 stars 0 forks source link

Add gimpact routines #1

Open jimbok8 opened 6 years ago

jimbok8 commented 6 years ago

Just found this repository. I have been interested in the Java version of Bullet for a while. if you don't mind I have a number of questions: Why did you make this port? How does this port differ from the jezek2 port or the enhanced port known as jmbullet? Do you have any plans to convert the gimpact code? Would the existing gimpact code from jmbullet work with your port? Thanks. Jim

gregdavisd commented 6 years ago

Hello Jim,

I made this Java version to use on my mobile games. The entire code was converted by myself from c++ to Java so it doesn't use any Java from other projects. At the moment this port is for the features & changes I need. I'm not familiar with those other projects.

With the features I've worked with have only ever got code coverage of around 35% to 40%. So a lot of the code has been retyped into Java and not tested, so be wary. I've only been verifying/fixing the features I use.

Gimpact does amazing things with being able to have deformable objects and more realistic collisions, but I figured it would take too much processing power on a mobile device to run at 60fps.

This port uses a different matrix/vector layout than other ports I've seen. Whereas the original design in C++ a matrix was an array of arrays in this port the matrices borrow from Java3D matrices which uses member variables (M00, M01, ... M33), also getters and setters. This was done to save memory as an array of array would require allocating multiple objects. Also so Box2D java port work with the same math classes which saves having to convert one type of Matrix or vector to another. This fundamental difference alone will make other ports incompatible without rework.

Regards, Greg.