3 ms·
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.
by sgt 2y ago
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.
- isjsndn 2y agoIs there any reason for you to assume otherwise? It's a physics engine, should be trivial to cross compile for the browser
- IshKebab 2y agoIt uses SIMD assembly and multithreading, neither of which are supported in WASM yet, so yes definitely.
- dkersten 2y agoAre you sure about multithreading? Emscripten supports posix threads out of the box: https://emscripten.org/docs/porting/pthreads.html 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