Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is very impressive! The most advanced JS 2d rigid body physics engine to date! You can do a lot of optimization though, probably double the speed. Tip: V8 loves objects and hates parsing strings.

Your functional spaghetti style is a bit weird though. I hate using the "find in file" function in my editor. I wanted to "rip" some of the functionality, but it's so entangled I would probably need all your other functions too to make it work. But maybe that's intended :P

Many people, me included, would be willing to pay for an engine like this. I tried your "Game physics for beginners" but I'm too stupid to understand all the articles from math professors. I could probably learn, but I rather pay someone who understands.

But for me to use your engine, the API needs to be much easier! Something like this:

  var box1 = new Body(size, position);
  var world = new World({gravity: 9.8});
  world.add(box1);
  world.render();

  console.log('New position: ' + box1.position);


It is more advanced than Box2D [0]? What makes you say that?

http://blog.sethladd.com/2011/09/box2d-javascript-example-wa...


Box2D is ported from C++ to Flash and then from ActionScript to JavaScript. So it might be slow to get updates and bug fixes.

But it looks usable and seems to have the same features as Matter.js




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: