Written entirely in Java with zero dependencies running on Java 1.6 or higher.
Over 2,000 automated JUnit tests, suite of samples, and Sandbox GUI application.
Getting started is easy with Javadocs, wiki, and more.
Open source and free to use in commercial and non-commercial applications.
The easiest way to get started is to clone the dyn4j-samples repo locally as shown below.
You can also get started by 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.
A quick 2 minute video showing the use of the samples GitHub project to get started using dyn4j
When simulating physical interaction between objects, there are many tradeoffs used to keep performance acceptable for realtime scenarios. The geometry of an object, or it’s shape, is no exception. To accelerate calculations, collision detection systems will enforce rules about what types of shapes are supported - a key example is Convexity. Not all objects are convex, and you might even argue that most aren’t, but we can combine these convex pieces to create non-convex objects.
Version 4.0.0 had a lot of changes to the API to support better extensibility, testability, and maintainability, but the biggest change was the 30-40% improvement in performance. This type of of performance gain is huge and a boon for sure for all those using the library - but just how was it done?
In my last post where I talked about the reasons for moving the dyn4j site to GitHub Pages and off of WordPress, I mentioned another post to describe the technical details of the move - this is it! Seriously though, it wasn’t trivial, but that’s in part due to some self-imposed (inflicted?) constraints.