JoltPhysics README

The project's README from github.com/jrouwe/JoltPhysics. As one markdown file: README.md.

CLA assistant Build Status Quality Gate Status Bugs Code Smells Coverage

Jolt Physics

A multi core friendly rigid body physics and collision detection library. Suitable for games and VR applications. Used by Horizon Forbidden West and Death Stranding 2: On the Beach.

Horizon Forbidden West Cover Art Death Stranding 2 Cover Art

Ragdoll Pile
A YouTube video showing a ragdoll pile simulated with Jolt Physics.

For more demos and videos go to the Samples section.

Design considerations

Why create yet another physics engine? Firstly, it has been a personal learning project. Secondly, I wanted to address some issues that I had with existing physics engines:

Features

Supported platforms

Required CPU features

Documentation

To get started, look at the HelloWorld example. A HelloWorld example using CMake FetchContent is also available to show how you can integrate Jolt Physics in a CMake project.

Every feature in Jolt has its own sample. Running the Samples application and browsing through the code is a great way to learn about the library!

To learn more about Jolt go to the latest Architecture and API documentation. Documentation for a specific release is also available.

Some algorithms used by Jolt are described in detail in my GDC 2022 talk: Architecting Jolt Physics for 'Horizon Forbidden West' (slides, slides with speaker notes, video).

Compiling

If you want to run on Platform Blue you'll need to provide your own build environment and PlatformBlue.h due to NDA requirements. This file is available on the Platform Blue developer forum.

For build instructions go to the Build section. When upgrading from an older version of the library go to the Release Notes or API Changes sections.

Performance

If you're interested in how Jolt scales with multiple CPUs and compares to other physics engines, take a look at this document.

Folder structure

Bindings for other languages

Integrations in other engines

See a list of projects that use Jolt Physics here.

License

The project is distributed under the MIT license.

Contributions

All contributions are welcome! If you intend to make larger changes, please discuss first in the GitHub Discussion section. For non-trivial changes, we require that you agree to a Contributor Agreement. When you create a PR, CLA assistant will prompt you to sign it.

Note that all PRs will be squashed before merging, so there's no need to force-push to git to keep the history clean.

JoltPhysics (jrouwe/JoltPhysics)

Searching Database…

What is this?Jolt Physics is a multi-core friendly rigid body physics and collision detection library written in C++, built for games and VR applications. It's the engine behind 'Horizon Forbidden West' and 'Death Stranding 2: On the Beach'.
Is this a full game engine or just a physics library I plug into something else?It's a standalone physics and collision detection library, not a full game engine. It's meant to be embedded into your own game or engine, and already has integrations for Godot, the Source Engine, and Unreal.
How do I add it to my project?Use CMake to build it, or pull it in with CMake FetchContent as shown in the HelloWorld example. It compiles with Visual Studio 2022+, Clang 16+, or GCC 12+ using C++17.
Do I need any external libraries to build it?No, Jolt depends only on the standard template library and doesn't use RTTI or exceptions, so a conforming C++17 compiler is all you need.
Is the simulation deterministic if I need networked physics?The simulation runs deterministically, so you can replicate it on a remote client by replicating only the inputs, though the README points to a separate 'Deterministic Simulation' doc for the exact limits of this guarantee.
Which platforms and CPUs does it actually support?Windows, Linux, FreeBSD, Android, macOS, and iOS across x86/x64/ARM/RISC-V/PowerPC, plus MSYS2 MinGW64 and a separate WebAssembly build. On x86/x64 the minimum CPU requirement is SSE2, and ARM64 uses NEON.
Does it handle soft bodies like cloth or hair, not just rigid bodies?Yes. It supports soft body simulation (edge, bend, pressure and tether constraints for things like cloth or balls) and a GPU-driven strand-based hair simulation built on Cosserat rods.
Can I use Jolt from languages other than C++?Yes, community bindings exist for C, C#, Java/Kotlin, JavaScript, Rust, Python, Zig, and Jai.
Why did the author write yet another physics engine?It started as a personal learning project and was meant to fix concurrency issues the author saw in existing engines, like allowing collision queries and body loading to run safely across multiple threads without locking the whole simulation.
What kinds of bodies and constraints can I simulate?Rigid bodies of shapes like spheres, boxes, capsules, convex hulls, meshes and height fields, plus a wide range of constraints (hinge, slider, cone, gear, pulley, swing-twist, 6-DOF) and full vehicle simulation for wheeled, tracked, and motorcycle setups.
What are similar projects?box2d, bullet3, cocos2d-x, box3d, taskflow, OpenRCT2, bgfx, assimp
Creator
jrouwe
Size
30.7 MB
Stars
11.8K
Age
5y
Commits · 90 Days