5 releases

0.1.2 Oct 24, 2022
0.1.1 Oct 22, 2022
0.1.0 Oct 22, 2022
0.0.2 Oct 22, 2022
0.0.1 Oct 20, 2022

#647 in Game dev

Download history 3/week @ 2023-12-04 6/week @ 2023-12-11 15/week @ 2023-12-18 11/week @ 2023-12-25 12/week @ 2024-01-08 3/week @ 2024-01-22 15/week @ 2024-02-05 11/week @ 2024-02-12 26/week @ 2024-02-19 34/week @ 2024-02-26 30/week @ 2024-03-04 28/week @ 2024-03-11 28/week @ 2024-03-18

126 downloads per month
Used in 10 crates

MIT/Apache

125KB
3K SLoC

ZENgine   CI

What is ZENgine?

ZENgine is a very simple 2D data-driven game engine for didactic purposes written in Rust using an ECS architecture.

Inspiration

ZENgine is heavily inspired by:

  • Bevy A refreshingly simple data-driven game engine built in Rust
  • Amethyst Data-oriented and data-driven game engine written in Rust
  • kudo An Entity Component System for Rust.

Didactic purpose

I started this project mainly to improve my knowledge in Rust, which is a programming language that I love, and in game engine architecture which is a subject that has always fascinated me.

I created a small series of videos (only in Italian 😏) that cover the first iteration of the engine before the massive refactor of all engine. In the future, I plan to create a series of posts about the engine and how it works.

Get Started

There's a very crude implementation of pong in the example folder that "should" run on Windows, Mac, Linux, Android, and every modern browser.

Desktop Env (Windows, Mac, Linux)

Simply run cargo run in the pong folder

Android

To build the android version is mandatory to setup correctly the environment.

You have to install the Android SDK and the Android NDK and correctly setup the env variables.

Then install cargo-apk with:

cargo install cargo-apk

and lastly, install the required toolchain:

rustup target add \
    aarch64-linux-android \
    armv7-linux-androideabi \
    x86_64-linux-android \
    i686-linux-android

Now to install the application on your device simply run:

cargo apk run --lib

in the pong folder.

WASM ENV

To launch the web version is mandatory to setup correctly the environment. Install the wasm32-unknown-unknown target with:

rustup target add wasm32-unknown-unknown

Then install wasm-bindgen-cli and Trunk with:

cargo install trunk wasm-bindgen-cli

Now you can serve the application using trunk serve

(it could be necessary to click on the browser page to make the input system work).

Dependencies

~2MB
~42K SLoC