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 2,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 test drive by downloading the samples which include a simple framework for rendering in both Java2D and JOGL.

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 rest of the samples for additional help.

If you do get stuck, take a look at the Documentation and Javadocs or create an issue on GitHub.

Quick Start Guide

A quick 2 minute video showing the use of the samples GitHub project to get started using dyn4j

If you'd like to learn more about how dyn4j works, check out the blog or read through the heavily documented source code on GitHub.