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.
Features
- Rigid body physics
- Stable stacking
- Gravity
- Fast persistent contact solver
- Dynamic tree broadphase
- Sliding friction
- Boxes, circles, edges and polygons
- Several joint types: distance, revolute, prismatic, pulley, gear, mouse
- Motors
- Sleeping (removes motionless bodies from simulation until touched)
- Continuous collision detection (accurate solving of fast bodies)
- Ray casts
- Sensors
- Serialization
Demos
- jbox2d-2.2.1.1-testbed.jar (jar executable)
- gwtbox2d demos (HTML5, best viewed with Chrome)
- OLD jbox2d demos (Java applet, v2.0.1)
About
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.
If you would like to help out with this project, or if you have any questions, please head over to the Box2D site and discuss with us in the Java Box2D subforum.
Links
JBox2D Links
Related Projects
Donate
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?