Skip to content

Jolt Physics #2139

Open

Description

@Xottab-DUTY

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 Opcode update #877 (comment)).
    • 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.

Activity

  1. Xottab-DUTY commented on Sep 14, 2026

    @Xottab-DUTY
    MemberAuthor

    @xxcactussell has already replaced OPCODE with Jolt in his https://github.com/xxcactussell/unxray fork. We can look at it as a reference.

  2. moved this to To do in Roadmapon Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    • Status
      To do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    ⌂ 换网址