Replies: 3 comments 1 reply
-
Two minimalist ECS I’m aware of: |
Beta Was this translation helpful? Give feedback.
-
Progress UpdateDevelopment of the micro ECS is proceeding well in #520. It ended up requiring more dramatic changes to planck than initially though because we want to have an untyped storage API, but it still ends up quite small and simple. I've got the draft for resource and component storage and the final thing to draft is the system API which I think we can copy ideas for from Bevy's After we draft the system API, then I've just got to polish it up, do a more thorough review, write more tests, and get review from anybody we can get to look at it. It's got a lot more unsafe than I'm used to writing, which makes review more important. I added Miri tests to CI so adding extra test cases, and maybe fuzz testing in the future will be important steps to making sure the ECS is sound. It's still quite simple so it shouldn't be a big burden once we get the core implemented. It's not something I foresee changing a lot once it works. |
Beta Was this translation helpful? Give feedback.
-
This is now done! The ECS is a part of the new bones project and with #541 Jumpy is now using it for it's core game loop. |
Beta Was this translation helpful? Give feedback.
-
This discusses the proposed "Step 1" described here as an incremental adoption of a new architecture for Jumpy. See that for more context.
Idea
Try to move the core game logic into an ulta-minimal ECS-like world that can be trivially snapshot and restored and that only runs single-threaded and deterministically.
How it is Now
Right now we have all of our core game logic running in a separate Bevy
Schedule
that is driven by thebevy_ggrs
plugin to run the game. This is difficult because taking snapshots of the Bevy world isn't easy, and it's not easy to get deterministic behavior out of Bevy.Micro ECS
We may be able to get away with something as simple as generational indices and a set of Vec's in a row. Or we use sparse sets. We want to essentially try the simplest thing that we can find that both:
Another thought is to wrap around the
slab
crate, with just enough organization to make it not annoying so that the game logic won't be messy.I'm going to look at all the simplest Rust ECS's that I can find, and how they do things.
Essentially you should probably be able to do what we are going to do without an ECS library, but we'll add just enough glue to make it nicer to use.
Our game logic is not complex, and we want to try and keep things obvious and simple, without introducing concepts that we don't need.
This idea is kind of vague. I haven't experimented with a possible API yet, and that will probably show pretty quickly whether or not this is going to be useful, but it would be good to get any feedback or links to projects that might be similar.
Beta Was this translation helpful? Give feedback.
All reactions