Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port Box2D v3? #78

Open
quinton-ashley opened this issue Aug 31, 2024 · 5 comments
Open

Port Box2D v3? #78

quinton-ashley opened this issue Aug 31, 2024 · 5 comments

Comments

@quinton-ashley
Copy link

Hi @Birch-san !

Do you have plans to port Box2D v3?

@quinton-ashley quinton-ashley changed the title Plans to port Box2D v3? Port Box2D v3? Aug 31, 2024
@aleph1
Copy link

aleph1 commented Dec 11, 2024

I am also wondering this as I have been considering beginning to implement better JavaScript bindings for v3 with Emscripten. I noticed you submitted a pull request to the Box2D repo recently, as have I. I'm aiming to start this work in the next week or two, but would hold off if it is easier for you to update the bindings.

@quinton-ashley
Copy link
Author

@aleph1 See the progress on this project!

https://github.com/Birch-san/box2d3-wasm

@Birch-san
Copy link
Owner

I am also wondering this as I have been considering beginning to implement better JavaScript bindings for v3 with Emscripten. I noticed you submitted a pull request to the Box2D repo recently, as have I. I'm aiming to start this work in the next week or two, but would hold off if it is easier for you to update the bindings.

my existing box2d3-wasm attempt already cleanly solves a lot of the problems of how to build this stuff and generate bindings and types, etc. I don't know how far it'll get in "next week or two" timescales, but if I can find a couple of spare evenings I'll have a better idea of whether the hardest problems (threading, SIMD, callbacks) are actually hard, and whether the bindings work or have surprises.

@aleph1
Copy link

aleph1 commented Dec 13, 2024 via email

@Birch-san
Copy link
Owner

okay that's encouraging, so does emscripten automatically do all the shenanigans required to spin up pthreads as Web Workers? in the past I've found Web Workers to be pretty horrible to get working with bundlers like webpack. if Firefox now supports SharedArrayBuffer that's encouraging.
I think I don't need those builds posted anywhere for now. source code is more interesting. if the secret sauce is just those Emscripten options… well, I had it when I cherry-picked your PR, but now I switched to mainline box2d which purportedly has the same patch. but it looks like the mainline changeset is not equivalent, since it's only activated when building unit tests etc. that's probably not suitable for library builds.

yeah, happy to consider PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants