News for hackers. Stuff that matters.
Re:Planck.js – JavaScript rewrite of Box2D physics library by shakiba on Thursday April 06, 2017 @12:09PM (#14051845)
Planck.js developer here! I have posted this to reddit before, so I'm just going to include it here too:

I have ported/rewritten Box2D physics engine to JavaScript, for cross-platform HTML5 game development. Planck.js includes entire Box2D algorithms, a simple HTML5 Testbed, more than 50 examples and some new game prototypes. The project is pre-released and there may still be minor issues, which I'm working to fix. So far I have spent more than 400 hours for developing this project and it consists of around 20k lines of code.

https://github.com/shakiba/planck.js

My main motivations for working on this project are:

- Taking advantage of Box2D's efforts, achievements and community knowledge

- Developing readable and maintainable JavaScript code

- Optimizing the library for web and mobile platforms

- Providing a JavaScrip-friendly API

Your feedback is highly appreciated, and I hope you use Planck.js to make some awesome games soon!

Re:Planck.js – JavaScript rewrite of Box2D physics library by Edmond on Thursday April 06, 2017 @12:21PM (#14051981)
The more things change the more they stay the same...I did a manual port of http://www.box2dflash.org/ to JS a few years back to make educational simulations:

http://schoolnotez.com/ http://appynote.com/app-store/ (see the pendulum example.)

good job.

Re:Planck.js – JavaScript rewrite of Box2D physics library by shakiba on Thursday April 06, 2017 @03:32PM (#14053837)
Great work! I decided to directly rewrite Planck.js from Box2D C++ code, so that I can keep it updated (as far as I remember that flash port was few years old).
Re:Planck.js – JavaScript rewrite of Box2D physics library by HalcyonicStorm on Thursday April 06, 2017 @12:30PM (#14052068)
I remember using your site to learn and play around with Box2d. Thank you for your effort
Re:Planck.js – JavaScript rewrite of Box2D physics library by lr4444lr on Thursday April 06, 2017 @04:47PM (#14054439)
Wish this was around back when the only other option was Box2DJS, which was a Flash conversion, maybe even nothing more than a trans-pile. I haven't had a use for it in years, but I will definitely keep it on hand. A commendable contribution! I thank you 100 times over!
Re:Planck.js – JavaScript rewrite of Box2D physics library by tiglionabbit on Thursday April 06, 2017 @06:04PM (#14055096)
I used that version just fine in my projects.
Re:Planck.js – JavaScript rewrite of Box2D physics library by tiglionabbit on Thursday April 06, 2017 @05:46PM (#14054943)
How does this compare to Box2DJS, the automatic conversion of the ActionScript version of Box2D?

http://box2d-js.sourceforge.net/

Re:Planck.js – JavaScript rewrite of Box2D physics library by shakiba on Thursday April 06, 2017 @06:18PM (#14055199)
Box2DJS is based on an old Flash port and as far as I remember it didn't work well when I tested it (for example second example on the website doesn't work currently, right click to switch to next example). I decided to directly port from C++ so that I can keep it updated.
Re:Planck.js – JavaScript rewrite of Box2D physics library by plopz on Thursday April 06, 2017 @05:37PM (#14054867)
How does this compare to other 2d physics libraries like p2.js?
Re:Planck.js – JavaScript rewrite of Box2D physics library by shakiba on Thursday April 06, 2017 @06:29PM (#14055274)
P2.js was a great effort and is a nice project. It is also inspired by Box2D and its API is very similar, however Box2D algorithm and architecture are more sophisticated and stable, and is already used in many popular games (such as AngryBirds) and game dev libraries (such as Apple's SpriteKit) so I decided to rewrite Box2D to make it available to JS/HTML5 game developers as well.
Re:Planck.js – JavaScript rewrite of Box2D physics library by CyberDildonics on Thursday April 06, 2017 @09:33PM (#14056334)
Why not just compile to asm.js?
Re:Planck.js – JavaScript rewrite of Box2D physics library by zaf on Friday April 07, 2017 @08:32AM (#14059081)
Really great work, gives me some ideas. Thank you.