Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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.

http://box2d-js.sourceforge.net

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
2  
-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
1  
Similar question: stackoverflow.com/questions/7628078/… –  a paid nerd Nov 1 '11 at 15:41
add comment

6 Answers 6

up vote 7 down vote accepted

Box2D has a kind of maintained version on github:

https://github.com/thinkpixellab/box2d

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

share|improve this answer
4  
'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
15  
@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
add comment

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

http://code.google.com/p/box2dweb/

share|improve this answer
    
So there are three versions at the moment? box2d-js.sourceforge.net github.com/thinkpixellab/box2d and code.google.com/p/box2dweb –  Petteri Hietavirta Feb 1 '11 at 12:58
3  
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: code.google.com/p/box2dweb/wiki/Roadmap –  DariusK Feb 1 '11 at 13:14
    
This version is also good - github.com/HBehrens/box2d.js –  onedayitwillmake Jun 26 '11 at 21:42
    
I started playing with box2dweb. It looks ok for now. Also - there is good documentation: box2dflash.org/docs/2.1a/reference –  sabiland Aug 30 '11 at 12:23
add comment

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

share|improve this answer
add comment

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

share|improve this answer
add comment

Also:

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 https://github.com/kripken/emscripten/issues/22
Too bad, I find interesting to adapt the original code rather than a port of a port...

share|improve this answer
add comment

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
add comment

Your Answer

 
discard

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.