https://github.com/eviltak/physics2d-rs
Yet another 2D physics engine, but with Iron Power.
https://github.com/eviltak/physics2d-rs
2d physics physics-2d physics-engine
Last synced: 9 months ago
JSON representation
Yet another 2D physics engine, but with Iron Power.
- Host: GitHub
- URL: https://github.com/eviltak/physics2d-rs
- Owner: eviltak
- License: mit
- Created: 2017-11-04T04:56:03.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2020-07-21T22:40:08.000Z (over 5 years ago)
- Last Synced: 2025-03-29T02:21:29.103Z (10 months ago)
- Topics: 2d, physics, physics-2d, physics-engine
- Language: Rust
- Homepage:
- Size: 404 KB
- Stars: 8
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# physics2d-rs
[](https://crates.io/crates/physics2d)
[](https://travis-ci.org/eviltak/physics2d-rs)
Yet another 2D physics engine, but with Iron power.
physics2d-rs is an educational project accompanying [my 2D physics article series](https://www.codeproject.com/Articles/1029858/Making-a-D-Physics-Engine-The-Math) and does not intend to compete with the likes of [nphysics](https://github.com/sebcrozet/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](https://crates.io/crates/sfml), and hence are dependent on both the [SFML](https://www.sfml-dev.org/) and [CSFML](https://www.sfml-dev.org/download/csfml/) development libraries. macOS and GNU/Linux users should have both packages available with their respective package managers. Windows users should follow [these](https://github.com/jeremyletang/rust-sfml/wiki/How-to-use-rust-sfml-on-Windows) instructions to set up the `sfml` crate.
To run an example, use the Cargo `run` command:
cargo run --example=EXAMPLE-NAME