Top
Best
New

Posted by makepanic 6 hours ago

Box3D, an open source 3D physics engine(box2d.org)
255 points | 50 comments
gregsadetsky 13 minutes ago|
Whenever I see Box2D mentioned (the library by the same author as Box3D, obviously), I think back to this story from many years ago

https://kotaku.com/this-guy-created-angry-birds-physics-and-...

tikotus 32 minutes ago||
Oh, nice! What a wonderful surprise!

Very easy to build, and quite small. A release build of the library is 916K (on macos at least). I have a game engine that compiles to WASM for web, and having 3D physics has been a challenge. 3D physics libraries tend to be large and hard to compile. I didn't try yet, but compiling this into a WASM library with emscripten should be easy, and it's likely small enough to be justifiable for a simple web game.

RobLach 3 hours ago||
Box2D was a foundation for a lot of interesting physics oriented indie games in my day.

I wonder if the landscape is empty enough for a resurgence.

flohofwoe 3 hours ago||
There weren't many free and open source 3D physics engines to begin with. The ancient forefathers are ODE, Bullet and Newton Dynamics (all first released in the early 2000s), then nothing(?) for nearly two decades until Jolt in 2021 and now Box3D.

Any addition to this small and exclusive list is very welcome :)

bee_rider 2 hours ago|||
There’s some ODE/more dimensions/PDE pun in here, for somebody better than me in physics or at least funnier.
mikulas_florek 1 hour ago||||
NVidia made PhysX open source in 2018, and it was free to use before.
badsectoracula 2 hours ago||||
> ancient forefathers are ODE

I remember trying this back in 2004 or so when i was making my first real 3D game engine, but i ended up abandoning it because i was trying to use it on 64bit Linux and the source code had typecasts between pointers and (32bit) ints all over the place :-P.

That was fixed later and apparently the engine was used in a few commercial games during the 2000s and early 2010s.

tapirl 1 hour ago||||
https://www.tapirgames.com/blog/open-source-physics-engines
artifact_44 30 minutes ago|||
[dead]
adamrezich 2 hours ago|||
Box2D is still pretty darn good! Definitely recommended for 2D physics game projects. The C APIs for Box2D and now Box3D are just so nice to work with.
mangogogo 3 hours ago|||
i remember being hooked on Incredibots back when that was still a thing! that was how I heard about Box2D way back.
thederf 3 hours ago||
Well hello random IncrediBots-remembering person! Such good times with an oddly wholesome and welcoming community.

I spent many of my teenage and early adult years trying to replicate it in HTML5. Finally got the Open Source version of IB2 largely ported during COVID: https://github.com/JoshTheDerf/Incredibots-2-HTML5-Open-Sour...

actionfromafar 3 hours ago||
I used Chipmunk2D a little back in the day, found it easier to use for whatever arcane thing I was doing.
turkeyboi 1 hour ago||
Box2d was somewhat recently rewritten in c and the api is improved, fwiw.
Jeaye 34 minutes ago||
Yes! This is exciting to see. Erin Catto is such a cool hacker. Thank you, Erin, for sharing your code with the open source community.

There wasn't anything about determinism in the announcement, but I'd really love to see some more about that, too. Trying to use Unity's built-in physics to make a networked billiards game is quite troubling, when none of the clients can happily agree on what happened.

tikotus 23 minutes ago|
I was looking for the same thing. There is a replay mechanism, so it seems to be deterministic. But with floating point physics, not across platforms. Though -ffast-math is unsupported according to the documentation, so maybe it is intended to be deterministic across platforms? https://box2d.org/documentation3d/recording.html

EDIT: Clarified meaning about ffast-math

tikotus 16 minutes ago||
Ah, found more: https://box2d.org/documentation3d/md_simulation.html#autotoc... "Box3D is designed to be deterministic across thread counts and platforms."

This is absolutely fantastic!

adalacelove 49 minutes ago||
Physics simulation is a dangerous rabbit hole. Even if you focus just on rigid bodies and just physical plausibility there are plenty of open problems related to collision detection and collision resolution. Convex approximations and/or decompositions for geometry and hand tuning of solvers are the norm, balancing robustness and precision against speed.
MomsAVoxell 1 hour ago||
Oh I'm so ready for this.. I've had some success with Box2D in the past, it's well and truly one of the top bits of F/OSS out there.

Box3D-based Spectre VR? It's so happening. (Shades of Tanarus ..)

EDIT: holy smokes, the transition to recording and playback in the Legend of California demo (Unreal Engine-based) is quite a jarring leap. If you at first get the impression things are quite basic, be sure to get into at least 18:00 into the demo video, it gets pretty wild .. recording and playback is awesome.

utopiah 2 hours ago||
I'm a bit familiar with Rapier (and before that Cannon and Ammo) so how does it compare?

PS: FWIW made my own physics engine in 3D space just few weeks ago (and shared it here). OK ok ... it's just a 1-liner that brings an object down at regular interval but it's surprising how well it works already! I recommend you give it a go as from a learning perspective it's really fun.

nasso_dev 3 hours ago||
> On the Valve side, Rubikon continues to evolve and Dirk has developed optimizations (similar to those in Box3D) in a new engine called Ragnarok. Look for that in future Valve games.

wait....

maplant 2 hours ago||
Don't get your hopes up, it'll be used in deadlock's volleyball game mode
nitwit005 31 minutes ago|||
They do have a bouncing ball of about the right size in the beta. I was thinking basketball though.
dom96 1 hour ago|||
It’s hilarious that I can’t tell if you’re being serious or not here
tapoxi 1 hour ago|||
Valve is working on a game codenamed HLX that apparently uses a ton of physics features. No idea what "HLX" means though.
jayd16 3 hours ago|||
Halflife 2D confirmed?
dude250711 2 hours ago||
Confirmed, released, and already forgotten. It was called "Codename: Gordon".
6SixTy 1 hour ago|||
Day of Defeat Source 2.1 just a week away!
cr125rider 3 hours ago||
Valve

Box3D

3D

3

Hope!

InsideOutSanta 22 minutes ago|||
Confirmed.
kidfiji 43 minutes ago||
I remember reading about it in S&Box's (Source-2-based game engine) blog a while back - glad to see it released out to the public!
HexDecOctBin 3 hours ago|
I do wonder how it compares against Jolt. Both seem to have a good pedigree, one from Valve and Eric Catto, and another used in Horizon games.
More comments...