4 stable releases
1.1.2 | May 27, 2021 |
---|---|
1.1.0 | Apr 11, 2021 |
1.0.0 | Apr 11, 2021 |
#1437 in Game dev
22 downloads per month
8KB
72 lines
Game Engine Core
Support an Open Source Developer! ♥️
Read the documentation.
Features
- Create and store a stack-based state machine.
- Manually update individual game frames.
- Automatically run a game loop.
- Game engine agnostic.
- Does not rely on ECS.
Usage
Add the following to you Cargo.toml file:
game_engine_core = "*"
Use it like so:
use game_engine_core::*;
struct MyState;
impl State<i32> for MyState {
fn update(&mut self, state_data: &mut i32) -> StateTransition<i32> {
*state_data += 1;
StateTransition::Quit
}
}
fn main() {
Engine::new(MyState, 0, |_, _| {}, 1000.0)
.engine_loop();
}
Maintainer Information
- Maintainer: Jojolepro
- Contact: jojolepro [at] jojolepro [dot] com
- Website: jojolepro.com
- Patreon: patreon
Dependencies
~0–7MB
~40K SLoC