Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/malpenzibo/zengine
A simple 2D ECS game engine built in Rust
https://github.com/malpenzibo/zengine
engine game-engine gamedev rust rust-lang zengine
Last synced: about 2 months ago
JSON representation
A simple 2D ECS game engine built in Rust
- Host: GitHub
- URL: https://github.com/malpenzibo/zengine
- Owner: MalpenZibo
- License: mit
- Created: 2020-02-04T13:48:59.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-08-14T16:21:39.000Z (5 months ago)
- Last Synced: 2024-10-30T09:27:14.354Z (3 months ago)
- Topics: engine, game-engine, gamedev, rust, rust-lang, zengine
- Language: Rust
- Homepage:
- Size: 5.51 MB
- Stars: 10
- Watchers: 2
- Forks: 2
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# ZENgine ![CI](https://github.com/MalpenZibo/ZENgine/workflows/CI/badge.svg)
## 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](https://github.com/bevyengine/bevy) A refreshingly simple data-driven game engine built in Rust
* [Amethyst](https://github.com/amethyst/amethyst) Data-oriented and data-driven game engine written in Rust
* [kudo](https://github.com/kettle11/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:
```bash
cargo install cargo-apk
```and lastly, install the required toolchain:
```bash
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:
```bash
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:
```bash
rustup target add wasm32-unknown-unknown
```Then install `wasm-bindgen-cli` and [Trunk](https://trunkrs.dev/) with:
```bash
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).