JBox2D: A Java Physics Engine
JBox2D is a close Java port of Erin Catto's excellent C++ Box2D physics engine. Check out the demos below to see some examples of what it can do.
Downloads, issue tracker, and wiki are at the project page hosted by Google Code.
- Rigid body physics
- Stable stacking
- Fast persistent contact solver
- Dynamic tree broadphase
- Sliding friction
- Boxes, circles, edges and polygons
- Several joint types: distance, revolute, prismatic, pulley, gear, mouse
- Sleeping (removes motionless bodies from simulation until touched)
- Continuous collision detection (accurate solving of fast bodies)
- Ray casts
- jbox2d-22.214.171.124-testbed.jar (jar executable)
- gwtbox2d demos (HTML5, best viewed with Chrome)
- OLD jbox2d demos (Java applet, v2.0.1)
This project is led by Daniel Murphy (toucansam in the forums). It was started in late 2007 by quixote_arg and ewjordan, and is released under the permissive and commercial-friendly open source zlib license, like the original Box2D engine.
For documentation, you can always refer to the included Javadocs, but JBox2D is very closely related to the C++ Box2D, so please see the C++ documentation at Box2D.org which, apart from minor name changes (b2Body -> Body, for instance, and in the Java port methods are camel-cased instead of capitalized), should apply equally well to JBox2D. Also see the source code of the demos (the org.jbox2d.testbed.tests package) to see how various effects are achieved in JBox2D.
This project is maintained in free time. Happy with the engine? Want to buy me a beer? Want to see more development? Want to be the first person to support this project?