Box3D: new 3D physics engine with native C API

Not directly Zig related, but since the open source physics engine space is sparse this might be interesting to some Zig projects. There’s now a “Box3D” physics engine by Erin Catto (of Box2D fame) which is entirely implemented in C:

Most other 3D physics engines are implemented in C++, and the C bindings (if available at all) have been bolted on as an afterthought and often as external projects which need to be manually updated.

34 Likes

I’m very excited to play with this, love that it’s all C.

7 Likes

Box2D has been around for quite awhile so I was happy to hear about a Box3D version. It’s just a shame that the author using LLMs these days.

2 Likes

this guy really gonna make a big ass pyramid and then not knock it down

alright. this has been fun. let’s look at another sample.

utter madness

11 Likes

Completely agree, none of the early 2000s wonder
We need to get back into the mental state where we can watch Half Life 2’s E3 2003 tech demo and oooh and aaah at a barrel pachinko machine that results in the barrels falling down a bumpy slope into water and then bobbing on the surface of the water

2 Likes

In fact I can’t think of a single physics engine that has been primarily written in C, last time I checked most of them were C++: PhysX, Bullet, Havok, Jolt, ODE, Newton Game Dynamics.

An open source and C one is a breath of fresh air.

3 Likes

It’s just a shame that the author using LLMs these days.

There’s a disclaimer at the bottom of the readme about how LLMs are used in the project, and I think those use cases are fair. It’s mostly mechnical stuff that doesn’t really benefit from doing it manually:

7 Likes

Absolutely sold on the record/replay. Record/replay on many things should be essential, it makes reproducing and fixing bugs a lot nicer experience, as well as adding new things to a test suite.

2 Likes