#physics #dynamics #real-time #2d #physics-engine

physics2d

Yet another 2D physics engine, but with Iron power

9 releases (5 breaking)

0.6.0 Aug 10, 2019
0.5.0 Nov 12, 2018
0.4.1 Nov 12, 2018
0.4.0 Feb 15, 2018
0.1.1 Dec 12, 2017

#6 in #dynamics

Download history 64/week @ 2019-06-25 55/week @ 2019-07-02 27/week @ 2019-07-09 9/week @ 2019-07-16 9/week @ 2019-07-30 28/week @ 2019-08-06 2/week @ 2019-08-13 127/week @ 2019-08-20 37/week @ 2019-08-27 32/week @ 2019-09-03 18/week @ 2019-09-10 68/week @ 2019-09-17 14/week @ 2019-09-24 25/week @ 2019-10-01

90 downloads per month

MIT license

100KB
2K SLoC

physics2d-rs

Crates.io Build Status

Yet another 2D physics engine, but with Iron power.

physics2d-rs is an educational project accompanying my 2D physics article series and does not intend to compete with the likes of nphysics, but can still be used as part of 2D games and simulations post the initial release.

Features

  • Convex polygon and circle collisions with restitution and friction
  • O(n log n) broad-phase collision detection using an AABB tree (bounding volume hierarchy)
  • Spring joints

To check the project's current progress, take a look at the available examples. New examples are generally created for every major feature addition.

Examples

The examples use the sfml crate, and hence are dependent on both the SFML and CSFML development libraries. macOS and GNU/Linux users should have both packages available with their respective package managers. Windows users should follow these instructions to set up the sfml crate.

To run an example, use the Cargo run command:

cargo run --example=EXAMPLE-NAME

Dependencies