finds.dev← search

// the find

Rawframe-Project/maul2d

★ 4 · C · MIT · updated Oct 2026

Deterministic 2D physics engine: bit-exact rollback, record/replay, particle fluids. C17, zero dependencies, MIT.

Maul2D is a 2D rigid-body and particle-fluid physics engine in plain C17 with no dependencies. Its main property is reproducibility: snapshots, restores and journal replays return the same bits. It is aimed at developers building rollback netcode, lockstep multiplayer, or replay and server-side verification for 2D games.

- The determinism claim is tested, not just asserted. CI compares printed world hashes across GCC, Clang and MSVC on x64 and arm64, Debug builds, a sanitizer build and WebAssembly, against values committed in test/hashes.txt. bench/pins.txt fails the build when a benchmark's final hash moves.

- Threading does not change results. The engine starts no threads of its own, parallel work runs on the caller's task system, and the AVX2, NEON and scalar kernels are required to agree bit for bit. Most physics engines do not test that last point.

- The rollback surface is small and concrete: m2World_SnapshotSize, m2World_Snapshot and m2World_Restore, with journal replay alongside. The fuzzer checks that replay, rollback and threaded runs agree on every seed, so the rollback path is exercised directly rather than spot-checked.

- Bad input is refused with a recorded reason instead of quietly corrupting the world, and defs carry a cookie so one that was not set up with its m2Default...Def function is rejected. These are cheap checks that save time when a bug only appears forty frames into a replay.

- The project is at version 0.0.1. Until 1.0.0 the API, the ABI and the snapshot and journal formats can all change in any minor release, and snapshots and tapes are tied to one library version. Shipping replays to players means either pinning the engine version for good or writing your own migration path.

- There are no language bindings yet. The C API is blittable and should bind cleanly, but anyone working in C#, Rust or Python has to write and maintain their own P/Invoke or FFI layer against an ABI that is still moving. The only starter kit mentioned is for the 3D sibling.

- The bit-exact guarantee holds on the configurations CI actually tests, not on every platform in principle. AVX2 builds need Haswell or later with FMA, MSVC needs Visual Studio 2022 or newer, and any other toolchain or CPU needs its own hash check before you rely on it. With four stars and one fork, the determinism claims have had little outside testing so far.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →