ericleong / forceengine

"My first physics engine."

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Force Engine logo

Force Engine 2

Force Engine 2 is an old (from 2007) physics engine written in Java with some game engine components. It is primarily a learning and research project focused on testing ideas around collision detection and response, as well as fluid dynamics.

There are also tutorials, presentations, and research papers explaining the circle-circle and circle-line collision detection and response algorithms.

Force Engine depends on Java 6. Force Engine Android requires the Android SDK.

demo

The easiest way to get the Java demo running is by opening the Force Engine project with Eclipse and running ForceEngineDemo.

To open the Android app, open Force Engine Android with Android Studio.

features

  • circle-circle collision
  • circle-line collision
  • circle-circle field interactions
  • triggers
  • explosions
  • fluids that interact with rigid bodies

library

The library can be exported from Eclipse using the physics.jardesc file in the Force Engine project. The .jar file produced is then used in Force Engine Android/app/libs.

usage

Create a new instance of the physics engine with

PhysicsEngine engine = new PhysicsEngine(<width>, <height>);

Inside a thread, advance to the next tick with engine.components().

About

"My first physics engine."

License:MIT License


Languages

Language:Java 100.0%