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.
This port has been developed by ewjordan and quixote_arg, and is released under the permissive and commercial-friendly open source zlib license (as is the original Box2D engine). To download the engine, please visit our Sourceforge project page.
Documentation is under construction, as are Javadocs. For the moment,
the best thing to do is look at the source code of the demos and see how
things are constructed. Alternatively, there is extensive documentation
on the C++ version of this engine 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.
JBox2D demos
Note: you often need to click on Java applets several times to give them keyboard focus.
Several joint types: distance, revolute, prismatic, pulley, gear, mouse
Motors
Sleeping (removes motionless bodies from simulation until touched)
Planned future features:
Continuous collision detection
Non-convex polygon decomposition
Convex hull generation
Line segment soups
World serialization
Ray casts
Spline joints
Ropes
Particles
Angle joint
Vehicles
Sensors
Heightfields
Characters
Top-down friction
If you would like to help out with this project, please head over to the Box2D site and discuss with us in the forums.
Project page at Sourceforge: JBox2D
JBox2D
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.
This port has been developed by ewjordan and quixote_arg, and is released under the permissive and commercial-friendly open source zlib license (as is the original Box2D engine). To download the engine, please visit our Sourceforge project page.
Documentation is under construction, as are Javadocs. For the moment, the best thing to do is look at the source code of the demos and see how things are constructed. Alternatively, there is extensive documentation on the C++ version of this engine 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.
JBox2D demos
Note: you often need to click on Java applets several times to give them keyboard focus.
- Bridge
- Compound Shapes
- Dominoes
- Domino Tower
- Gears
- Motors and Limits
- Pendulum
- Pulley
- Poly Shapes
- Pyramid
- Varying Friction
- Varying Restitution
- Vertical Stack
- Washing Machine
- Web
All demos use Processing for graphics rendering.Features
- Rigid body physics
- Stable stacking
- Gravity
- User-defined units
- Fast persistent contact solver
- Sweep and prune broadphase
- Sliding friction
- Boxes, circles, and polygons
- Several joint types: distance, revolute, prismatic, pulley, gear, mouse
- Motors
- Sleeping (removes motionless bodies from simulation until touched)
- Planned future features:
- Continuous collision detection
- Non-convex polygon decomposition
- Convex hull generation
- Line segment soups
- World serialization
- Ray casts
- Spline joints
- Ropes
- Particles
- Angle joint
- Vehicles
- Sensors
- Heightfields
- Characters
- Top-down friction
If you would like to help out with this project, please head over to the Box2D site and discuss with us in the forums.Project page at Sourceforge: JBox2D