Skip to content

Use an ECS for event management #1

@conradludgate

Description

@conradludgate

I've been a bit busy recently, there's an idea I wanted to work on but so far haven't had the time. Thought I'd put it here instead.

Currently this crate is based on explicit event handlers and emits. It's also seemingly mirroring some inheritance based design.

What came to mind is that hermes-five is somewhat like a game engine. The devices are like NPC characters in a game world, which respond to events in order to move around. One of the leading database engines in Rust at the moment is Bevy. Cut out all the audio and visual and you are left with https://docs.rs/bevy_ecs/latest/bevy_ecs/.

I haven't actually attempted refactoring hermes-five to use bevy yet, but it's an interesting idea to me. When I have time I will attempt it just to see. I don't know if the API will really be that great, but I want to see nonetheless.

There's also some scripting support in some third party crates that would be interesting to explore
https://github.com/jarkonik/bevy_scriptum
https://github.com/makspll/bevy_mod_scripting

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions