Skip to content

kadir014/nova-physics

Repository files navigation

Nova Physics is a lightweight and easy to use 2D physics engine.

You can also read this page in
EN

Features

  • Simple and user-friendly interface
  • Rigid body dynamics
  • Primitive shape collisions (circle, rect, polygon, AABB)
  • Broad-phase strategies (Spatial hashing & BVH-tree)
  • Physical material properties (friction, restitution and density)
  • Joint constraints (spring, distance, hinge ..)
  • Great stacking stability and collision persistence
  • Erin Catto's iterative sequential impulse solver algorithm
  • Semi-implicit (symplectic) Euler integrator
  • Collision event callbacks
  • Sleeping bodies to reduce CPU load
  • Attractive forces
  • Built-in profiler
  • Portable codebase with no dependencies
  • Various interactive example demos using SDL2

Roadmap & Future

Nova Physics is still in its early stages as in 0.x.x versions. There is a large room of improvement and optimization of the API and engine's itself. Here are some of the important points that needs a touch before reaching the 1.x.x milestone:

  • Better & faster broad-phase

    Current broad-phase strategies available in Nova are a spatial hash grid and a BVH (bounding volume hierarchy) tree. Both are fast but there is still room for improvement, especially for BVH-tree construction and multi-threaded SHG tasks.

  • Python binding

    Nova Physics's Python module (here) is still WIP. I plan it to have an easy-to-use Pythonic interface. Other language binding contributions are also always welcome!

Installing & Building

Development libraries are always shipped with the most recent release under the name of nova-physics-X.X.X-devel.zip (or .tar.gz). You can download the archive here and link libnova.a (or libnova.lib) with your favorite compiler to use Nova Physics in your project.

But if you want (or need) to build Nova Physics from scratch on your own, use the building guide.

Examples

Example demos are in examples directory, use the example building guide to run examples.

Documentation

You can access the documentations here.

Resources & References

Following are some of the many great resources that helped me to build Nova Physics to this state.

License

MIT © Kadir Aksoy

Nova Physics is, and always will be, free and open-source. Although we would greatly appreciate donations!