Jolt-JNI project overview
Jolt JNI is a physics-simulation library for JVM languages such as Java, Python, JavaScript, Kotlin, Groovy, and Scala.
Use it to:
-
add solidity to architecture, characters, projectiles, terrain, and vehicles,
-
detect collisions between complex shapes,
-
perform contact, ray, and sweep tests,
-
simulate characters and buildings collapsing in real time, and
-
simulate cloth, rope, and deformable volumes, including their interactions with rigid bodies.
Tutorials and sample apps are provided to help you get started.
All software in the Jolt-JNI project is free and open-source, including the JVM library, the native libraries, the demo and tutorial apps, and the software used to build, test, and run them.
The underlying simulation software comes from Jolt Physics, a modern, thread-aware physics simulator. But although Jolt Physics is written in C++, you won’t need any knowledge of C++ to use Jolt JNI.
Jolt JNI also incorporates source code from the V-HACD project.
Caveats
Jolt JNI’s focus is on simulating classical mechanics in just enough detail to add verisimilitude to 3-D games. It’s not intended for 2-D platformers, nor for scientific research. For 2-D physics, consider using dyn4j instead.
Jolt JNI and its documentation assume a certain level of proficiency with the Java programming language. The project isn’t aimed at non-programmers, nor developers without prior Java experience. Similarly, it assumes familiarity with vector math and 3-D computer graphics.
While an understanding of classical mechanics is assumed, many of its technical terms are linked (at first use) to the relevant article in the English Wikipedia.
Jolt JNI requires a Java runtime, version 11 or higher. To build Jolt JNI from source, I recommend a Java Development Kit, version 17 or higher.
The project’s open-source license disclaims liability for defects. Please don’t use this software in safety-critical applications.
What’s missing
Current limitations gated by Jolt Physics:
-
Jolt JNI doesn’t simulate collisions between soft bodies, nor self collisions within soft bodies. See Jolt-Physics issue 789.
-
Jolt JNI doesn’t simulate anisotropic friction. See Jolt-Physics issue 1216.
-
Aside from buoyancy and drag on rigid objects, Jolt JNI doesn’t simulate fluid dynamics.
Also, Jolt JNI doesn’t yet run on every known platform. In particular, native libraries aren’t provided for AIX, FreeBSD, iOS, LoongArch, PowerPC, RISC-V, 32-bit Windows, or Windows on ARM. These limitations aren’t inherent to Jolt JNI; they’re gated by access to test hardware.
Furthermore, Jolt Physics is a large project, and Jolt JNI doesn’t yet provide access to all its features. (Its goal is utility, not completeness.) For instance, Jolt JNI doesn’t implement custom collision shapes yet.
Feature requests are welcome, and can be submitted via the issue tracker. If you plan to contribute to Jolt JNI, please read the contributor guide.
Getting help
For self-help, utilize the tutorials, the javadoc, and the source code.
For further reading there is also the official Jolt-Physics documentation.
For issues that are best handled privately, contact me by e-mail. My personal e-mail address appears at the bottom of my homepage and in the source code.
I welcome suggestions concerning the future development of Jolt JNI.
Next steps
If you’re curious how Jolt JNI works, proceed to the Implementation page.
To gain hands-on experience, proceed to the first tutorial page.