1 unstable release
Uses new Rust 2024
new 0.1.0 | May 13, 2025 |
---|
#430 in Game dev
72KB
1.5K
SLoC
Monolith is a framework based on tokio and bevy.
Later pseudo-code gives an overview:
async sprite::run() {
sprite_in_village();
...
sprite_enter_dungeon();
loop {
match evt = from_bevy().await {
GameEvent::MoveLeft => {
self.pos.translation.x -= 1.0;
to_bevy().send(Task::SyncEntity, self.entity, self.pos);
}
...
}
}
...
}
- Sprite::run should be based on sprite state machine rather than being split to fit with ECS.
- Sprite::run hardcodes GameEvent (logic event).
- Monolith treats bevy as a display and peripheral wrapper library -- from_bevy and to_bevy.
- Monolith supports tokio, that is, you can run time-cost algorithm in coroutine context.
More highlight about monolith
- DeveloperBackend: permit developer inject GameEvent, observe inner variables etc.
- RecordBackend/ReplayBackend: game recording feature.
- Referee-Athlete: a brand-new lock for savefile.
Dependencies
~63–100MB
~2M SLoC