Meet QuarkPhysics, an alternative to Box2D

🚀 Ideal for SFML and Godot gamedevs


Meet QuarkPhysics, an alternative to Box2D


QuarkPhysics is a 2D physics engine developed for games, with the goal of simulating rigid and soft bodies in an integrated way.

It supports primitive shapes (circle, polygon, rectangle), physical properties (mass, area, restitution), raycasting, collision masks, and an advanced event system.

In addition, it uses pixels as the default unit, has a simple and consistent API, and supports UV mapping with QMesh for rendering operations.


Compilation and Example

Before compiling QuarkPhysics, you must have SFML and CMake installed on your system. After installing these dependencies, follow the steps below:

Clone the repository:

git clone https://github.com/erayzesen/QuarkPhysics

Access the project directory:

cd QuarkPhysics

Give execution permission to the file that will compile and run the example:

chmod +x run_linux_fast.sh

And run the script:

./run_linux_fast.sh -r

The output will be similar to the image below:

QuarkPhysics run.png

If you are unable to compile, try installing nlohmann’s json.


To integrate QuarkPhysics into your project, copy the “QuarkPhysics” folder to your project directory and use it as needed.

In the case of Godot see this integration.

For more information, access the official repository.


See also:

Meet Box2D, a 2D physics engine for games


gamedev sfml godot physics


Share


YouTube channel

Subscribe


Marcos Oliveira

Marcos Oliveira

Software developer
https://github.com/terroo

Related articles