Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have been thinking about creating a top down 2D car game for HTML5. For my first game I wrote the physics and collisions my self but for this one I would like to use some ready made library.

I found out Box2D and its JS port.

It seems to be quite old port, made in 2008. Is it lacking many features of current Box2D or does it have major issues with it? And are there any alternatives for it?

share|improve this question
-1 because there are known issues with all software. Specific questions, please. – user744 Jan 27 '11 at 22:40
I don't know if your comment was before or after the edit, but I think it's pretty clear that the OP is asking for major issues that could be serious problems (e.g. using more than X joints will crash the program) not any known issue – The Communist Duck Feb 1 '11 at 16:29
It was before the edit, but I still think it's a bad question. For example, using more than 10,000,000 joints will crash the program for sure. Without specific concerns, this question is effectively "Please review <software>" - that's not a very good question. The SE format is good for focused questions; Google is better for general overviews. (You'll notice that neither answer gives actual issues with Box2D JS, just a point towards an alternative, which might as well re-ask the question.) – user744 Feb 2 '11 at 20:06
Now the question has been edited beyond recognition - and when asked this way becomes trivially Googleable - and since it's asking for a list of things, it's probably best as CW. – user744 Feb 2 '11 at 21:35
Similar question:… – a paid nerd Nov 1 '11 at 15:41
up vote 7 down vote accepted

Box2D has a kind of maintained version on github:

Microsoft is using it for at least on of their IE9 test drive demos.

share|improve this answer
'Microsoft is using it for at least on of their IE9 test drive demos.' is that really something to be proud of? – rightfold Feb 3 '11 at 15:24
@WTP Have you even tried some of the JS and Canvas demos in IE9? The entire browser is hardware accelerated, and has some of the fastest HTML5 performance across the board. Just because a version of browser sucked 10 years ago, doesn't mean it still does. – AttackingHobo Jun 20 '11 at 17:59
@AttackingHobo, +1, IE6, 7 really suck. 8 More or less. 9 or 10 are decent browsers. Stop hating the entire family because of a few outdated family members. – lukas.pukenis Jul 4 '13 at 11:19

There's box2dweb, which is a much newer port and has a lot fewer issues than box2djs. I highly recommend it.

share|improve this answer
So there are three versions at the moment? and – Petteri Hietavirta Feb 1 '11 at 12:58
Yes, although it looks like Box2Dweb is being actively developed (last checkin 1/23/11) whereas the github one is less so (last checkin 10/29/10). Also, Box2Dweb has an active roadmap for where it's going next: – DariusK Feb 1 '11 at 13:14
This version is also good - – onedayitwillmake Jun 26 '11 at 21:42
I started playing with box2dweb. It looks ok for now. Also - there is good documentation: – sabiland Aug 30 '11 at 12:23

A popular alternative (though not a port) is cannon.js, a "lightweight 3D physics engine" for the web.

share|improve this answer

While this isn't Box2D, there is a port of JigLib (3D Physics) to JS: I haven't used it, but it was ported to be used in the GLGE WebGL library.

share|improve this answer


I also remember a port for the original C++ code to JavaScript using Emscripten ie. LLVM but I can't seem to find it back. Only found
Too bad, I find interesting to adapt the original code rather than a port of a port...

share|improve this answer

There is very good alternative for Box2D-JS, just see box2dweb. See this game which is built using box2dweb. You can make your project easily using this physics engine.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.