olcPixelGameEngine-rs
Library offers Rust API for olcPixelGameEngine. I try keeping the methods and constants similar to the original C++ code so the API feels familiar and it is easy to follow along the tutorial videos.
The code builds on Linux and macOS/OSX (any 10.x, including older versions, only X11 is required) and uses my mac port of pixel game engine https://github.com/sadikovi/olcPixelGameEngine-macos.
You can link the crate as a dependency and extend Application
trait to run the pixel game engine:
extern crate olc_pixel_game_engine;
use crate olc_pixel_game_engine as olc;
I recommend checking out the documentation to see what APIs are available.
Examples
You can look at the examples in examples/ directory to get a sense of available APIs,
make sure to also check out docs.
I will be adding more examples in that directory. Some of them are the direct ports of
olcPixelGameEngine
examples and videos. Feel free to add more as you explore the pixel game engine!
Run examples
For example, run the Isometric Tiles demo with cargo run --example isometric_tiles
.
Build
Run cargo build
to build the project.
Test
Run cargo test
for the project tests.
Docs
Run cargo doc --open
to build and view the documentation locally.