Skip to content

freyinds/gdx-ode4j

 
 

Repository files navigation

libGDX Open Dynamics Engine (ODE4J) - physics engine LIBRARY

This is a ODE4J library compatible with all libGDX backends, including GWT. It is based on version 0.4.2 of Open Dynamics Engine for Java.

How to use in your project

You can use the master-SNAPSHOT tag as I do not plan to release different versions, only bug fixes.

Add the dependency in your core project:

project(":core") {
    ...

    dependencies {
        ...
          api "com.github.antzGames:gdx-ode4j:master-SNAPSHOT"
    }
}

If you are targeting HTML (GWT) you will also need the following:

project(":html") {
    ...
    dependencies {
        ...
        implementation "com.github.antzGames:gdx-ode4j:master-SNAPSHOT:sources"
        implementation "com.github.tommyettinger:formic:0.1.4:sources"
    }
}

and lastly add this to your GdxDefinition.gwt.xml file:

<module>
    ...
    <inherits name="gdx_ode4j" />
    <inherits name="formic" />
    ...
</module>

Runtime examples

Some examples can be found in my gdx-ode4j-examples repository.

Or play with them on itch.io.

2023-07-14.00-06-37.mp4

Math classes

Ode4j has its own math classes similar to libGDX's Vector3, Matrix3, Matrix4, and Quaternion.

I added a math utility class called Ode2GDXMathUtils. Use the following methods to create the libGDX Quaternion from ode4j's QuanternionC or DMatrix3C:

    Quaternion q1 = Ode2GdxMathUtils.getGdxQuaternion(odeQuaternion);  
    Quaternion q2 = Ode2GdxMathUtils.getGdxQuaternion(odeMat3);

In addition ode4j uses double and not float like most of libGDX's math classes.

Where to get ODE/ode4j documentation and help

ODE official manual: http://ode.org/wiki/index.php/Manual

By far the most useful part is the HOWTO section

ode4j discord channel : https://discord.gg/UFXJcXv2P8 ode4j/Java

ode4j contains also some features that are not present in ODE, such as a ragdoll and heightfields with holes. See ode4j's Wiki.

The ODE forum is useful for questions around physics and general API usage.

The ode4j forum is for problems and functionality specific to ode4j/Java.

There is also the old website, including some screenshots.

Here is a Youtube video of a list of games that used ODE from 2002-2015. You will be suprised how many of your favorite games used this physcis libary.

ODE, ode4j and other Licenses

Licensing & Copyright for ODE and ode4j

This library is under copyright by Tilmann Zäschke (Java port), Russell L. Smith (copyright holder of the original ODE code), Francisco Leon (copyright holder of the original GIMPACT code) and Daniel Fiser (copyright holder of the original libccd).

This library is free software; you can redistribute it and/or modify it under the terms of EITHER: (1) The GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The text of the GNU Lesser General Public License is included with this library in the file LICENSE.TXT. (2) The BSD-style license that is included with this library in the files ODE-LICENSE-BSD.TXT and ODE4j-LICENSE-BSD.TXT.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files LICENSE.TXT, ODE-LICENSE-BSD.TXT, GIMPACT-LICENSE-BSD.TXT, GIMPACT-LICENSE-LGPL.TXT, ODE4J-LICENSE-BSD.TXT and LIBCCD_BSD-LICENSE for more details.

The LICENSE.TXT, ODE-LICENSE-BSD.TXT, GIMPACT-LICENSE-BSD.TXT, GIMPACT-LICENSE-LGPL.TXT, LIBCCD_BSD-LICENSE and ODE4J-LICENSE-BSD.TXT files are available in the source code.

Legal

ode4j: Copyright (c) 2009-2017 Tilmann Zäschke [email protected]. All rights reserved.

Like the original ODE, ode4j is licensed under LGPL v2.1 and BSD 3-clause. Choose whichever license suits your needs.

ode4j contains Java ports of the following software

ODE/OpenDE: Copyright (c) 2001,2002 Russell L. Smith All rights reserved.

GIMPACT (part of ODE/OpenDE): Copyright of GIMPACT (c) 2006 Francisco Leon. C.C. 80087371. email: projectileman(AT)yahoo.com

LIBCCD: Copyright (c) 2010 Daniel Fiser <danfis(AT)danfis.cz>; 3-clause BSD License

Turbulenz Engine: Copyright (c) 2009-2014 Turbulenz Limited; MIT License

About

libGDX ODE4J library - GWT compatible

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%