In disc golf, a starframe occurs when every player in a group scores a birdie on the same hole.
This starframe, however, is a 2D game engine written in Rust as a solo hobby project. Its main feature is the physics engine, with design driven by sidescrolling action games. It is currently being developed alongside Flamegrower, a platformer about vines and fire.
- 2D rigid body and particle physics
- high-fidelity solver based on Extended Position-Based Dynamics
- collider shapes: circles, convex polygons, and rounded convex polygons
- compound shapes of many of these also supported
- raycasts and spherecasts
- particle-based ropes with full coupling with rigid bodies
- graphics using wgpu
- colored 2D triangle meshes
- support for skinning and animation (WIP)
At least for now, this is intended just for my personal use. There are a lot of rough edges, missing features, and even more missing documentation. It's very far from something you can make an entire game with at the moment. That said, the physics is perfectly usable already, at least for the things I'm doing with it (though not always very easy to use). If you want some really detailed 2D physics simulation and are adventurous enough to deal with a lot of incomplete bits, there might be some fun to be had here.
I write about this project once in a blue moon on my website.
I have a little sandbox I use for testing new features where you can throw blocks around with the mouse and move a rudimentary platformer character that shoots some rather heavy bullets. Here's how you can check it out:
If you have access to a WebGPU-enabled browser (Firefox Nightly or Chrome Canary with the right flag set), you can try out this online build of the sandbox! Due to the instability of the feature in current browsers it may or may not work, and it might not be the latest version here on git, but it's there and it's cool. Thanks wgpu!
- Install Rust
- You may need to install
pkgconfig
and drivers for Vulkan, DX12, or Metal depending on your platform - Clone and navigate to this repository
cargo run --example sandbox
The easy way, using Nix (on Linux)
- Clone and navigate to this repository
nix-shell
cargo run --example sandbox
Disclaimer: these might be out of date - the sandbox changes in quick and dirty ways
Space - step one frame while paused
Left mouse - grab objects
Middle mouse - move the camera
Mouse wheel - zoom the camera
Arrows - move the player
LShift - jump
Z - shoot