Java Collision Detection and Physics Engine

A 100% Java 2D collision detection and physics engine. Designed to be fast, stable, extensible, and easy to use. dyn4j is free for use in commercial and non-commercial applications (see the New BSD License).

100% Java

Written entirely in Java with zero dependencies running on Java 1.6 or higher.


Over 1,000 automated JUnit tests and Sandbox GUI application.


Getting started is easy with Javadocs, wiki, and more.

Open Source

Open source and free to use in commercial and non-commercial applications.

Take dyn4j for a test drive by playing with the Sandbox application.

Getting started is simple

Getting started is as simple as downloading the latest version of the library, adding it to your project, and then taking a look at the UsingGraphics2D and UsingJogl sample applications. Check out the samples for additional help.

Watch this 6 minute Quick Start Guide to see just how easy it is.

If you do get stuck though, take a look at the Documentation and Javadocs or start a topic on the forums.

Quick Start Guide

NOTE: The following video is a bit out of date. The recommended way to link to the library is to use Maven or a release from GitHub. The sample code has moved to a sub project called dyn4j-samples in GitHub.

If you'd like to learn more about using OpenGL in Java JOGL. Or, if you are really bored, check out my Blog.