Re:Box2D 3.0 Released
by sgt on Monday August 12, 2024 @06:11AM
(#41222893)
Will it be possible to use Box2D 3.0 on WASM? So in other words write your game code in C, and then run it seamlessly in your browser.
[ Parent
| on HN ]
Is there any reason for you to assume otherwise? It's a physics engine, should be trivial to cross compile for the browser
It uses SIMD assembly and multithreading, neither of which are supported in WASM yet, so yes definitely.
Are you sure about multithreading? Emscripten supports posix threads out of the box: https://emscripten.org/docs/porting/pthreads.html
Or do you mean threads that aren’t built on top of webworkers? I don’t think there’s a meaningful difference, since both the code and memory are shared across workers using SharedArrayBuffers