Add rigid body physics like gravity, collisions, and joints to a C or C++ game
Simulate spheres, capsules, and boxes with zero rest penetration between resting objects
Run physics deterministically across multiple threads for networked multiplayer or replays
Compile a dependency-free, single-file physics engine into a project without a build system
| melonwithglasses/melon3d | 0x-shadow/crewtrack | gingerbreadfork/wolf3d-path-traced | |
|---|---|---|---|
| Stars | 7 | 7 | 7 |
| Language | C++ | C++ | C++ |
| Setup difficulty | easy | moderate | hard |
| Complexity | 4/5 | 3/5 | 5/5 |
| Audience | developer | general | developer |
Figures from each repo's GitHub metadata at analysis time.
No external dependencies, builds with CMake or as a single amalgamated file via the included Python script.
Melon3D is a physics engine, a piece of software that calculates how solid objects like boxes, balls, and capsules move, collide, and come to rest, meant to be used inside video games. It handles things like gravity, collisions, joints connecting objects together, and friction, and it does all of this without depending on any other outside libraries, so it is easy to drop straight into a project. Under the hood, it uses an approach called position based dynamics, which is a different mathematical strategy for solving physics than the one used by many popular game physics engines. According to the project, this choice means that objects resting on top of each other truly stop overlapping instead of sinking into each other by a tiny, hidden amount, which is a common trade off other engines accept. The project's own comparison table lays out these differences directly against Box2D, PhysX, and a well known engine called box3d. The engine also runs its calculations across multiple processor cores at once by design, and it claims that no matter how many cores are used, the simulation always produces exactly the same result every time, which matters for games that need consistent, repeatable behavior, such as ones with replays or networked multiplayer. It supports common shapes like spheres, capsules, and boxes, several kinds of joints for connecting bodies together, friction that has been checked against real physics formulas, and features like sensors, raycasting, and sleeping bodies that stop being simulated once they settle. It is written in C++ and built with CMake, and it can also be compiled as a single combined file for projects that want to avoid a build system entirely. The project includes its own test suite and a set of benchmark scenes that compare its performance directly against box3d, with the exact hardware and settings used for those comparisons published openly. This tool is aimed at game developers and graphics programmers who are comfortable working in C or C++ and want a lightweight, dependency free physics engine, rather than at people without a programming background.
A dependency-free 3D physics engine for games that simulates rigid bodies with zero overlap and deterministic multithreading.
Mainly C++. The stack also includes C++17, CMake, SIMD.
MIT license: free to use, modify, and distribute for any purpose, including commercial use, as long as you keep the copyright notice.
Setup difficulty is rated easy, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Don't trust strangers blindly. Verify against the repo.