yunfengzh_monolith

Crates.ioyunfengzh_monolith
lib.rsyunfengzh_monolith
version0.3.0
created_at2025-05-13 02:08:06.173951+00
updated_at2025-06-20 23:56:26.549734+00
descriptionMonolith is a framework based on tokio and bevy.
homepage
repositoryhttps://github.com/yunfengzh/monolith
max_upload_size
id1671335
size273,764
(yunfengzh)

documentation

README

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);
            }
            ...
        }
    }
    ...
}
  1. Sprite::run should be based on sprite state machine rather than being split to fit with ECS.
  2. Sprite::run hardcodes GameEvent (logic event).
  3. Monolith treats bevy as a display and peripheral wrapper library -- from_bevy and to_bevy.
  4. 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.
Commit count: 4

cargo fmt