Open bengolds opened 10 years ago
It's worth noting that the Box2D version used by Love has been modified although I'm not sure how much or in what ways. We should probably find out how much it was modified and why.
Once that has been figured out, I would love to use an emscripten'd version of Love's Box2D. I strongly considered using emscripten on graphics module but in the end it didn't seem practical. I suspect that the physics module would be a stronger candidate for this process.
If we decide to go ahead with this, we should probably have a separate repo that is a fork of kripken's work set up to build our box2d.js and then we can just depend on that repo from this one.
How does that sound? :D
Seems reasonable. I just noticed that my original markdown was a bit messed up; the box2d.js-kripken repo is not actually pulled from Love2D's distribution. That leaves two alternatives; modify kripken's repository manually to match the version distributed with Love2D, or directly emscripten the Love2D module. I'll examine the differences in Love2D's distro of Box2D.
:+1:
I think the only modification was to change the b2Assert define to throw a love::Exception so that box2d errors are propagated to Lua.
In that case, it hardly matters since the love::Exception stuff hasn't been implemented yet. Still, the version of Box2D used should probably match Love's at 2.3.0 so kripken's work would need a minor update.
If I knew coffeescript I would help with this
Right now love.physics is unsupported; before I take a crack at it I wanted to discuss what the best way to implement it would be. Some options:
Create new Box2D JS implementation Use existing Box2D JS implementation:
Emscripten the box2d code straight from Love2D's distribution.
Thoughts? box2d.js-kripken seems the most current.