Jolt Physics
Open
Nobody has claimed this yet.
Enhancement
Physics
- Dominant language
- C++
- Stars
- 3.6k
- Forks
- 536
- Avg merge
- 6d 1h
- Merged PRs (30d)
- 3
Description
Current physics engine and world representation:
- Original ODE 0.5 with original modifications made by GSC, with few changes merged from ODE 0.6 by OpenXRay.
- Used as a backend by xrPhysics, which provides abstract physics interface.
- OPCODE 1.2 with changes by OpenXRay contributors to support caching.
- Used as a backend by xrCDB, which provides abstract collision detection interface.
Proposed better alternative:
- Jolt Physics instead of both ODE and OPCODE, unified physics world representation.
- xrCDB is a candidate for removal, while it's functionality is to be replaced or moved to xrPhysics module.
Reasoning:
- ODE 0.5 is not made for x64, nor for multithreading.
- OPCODE is faster than ODE, but Jolt possible can be even faster, removing the need for separate collision detection module.
- Jolt supports x64 and has been made with multithreading in mind, and it also provides many more advanced features.
Possible implementation plan:
- Optionally update OPCODE to https://github.com/solbjorn/OpCoDe (see https://github.com/OpenXRay/xray-16/issues/877#issuecomment-2637054334).
- The new versions works better and it should be faster to integrate it, so that users get performance improvements sooner.
- Replace OPCODE with Jolt.
- Make sure everything in the game works properly.
- Replace ODE with Jolt.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source files or tests are named. Start by tracing the xrPhysics and xrCDB entry points and their ODE and OPCODE backends, then evaluate the proposed Jolt migration plan; done means both physics paths are replaced or consolidated and the game works properly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- game-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100