lyra-engine/lyra-ecs
SeanOMik b51f1e16ef
ecs: fix World::insert, finish a TODO related to it
The TODO was that if the archetype has a single entity, add a component column for the new component instead of moving the entity to a brand new archetype
2024-03-03 16:19:59 -05:00
..
lyra-ecs-derive Switch to lyra-ecs systems, move ecs mod to scene mod, reexport lyra-ecs as ecs 2023-12-26 23:48:46 -05:00
src ecs: fix World::insert, finish a TODO related to it 2024-03-03 16:19:59 -05:00
.gitignore early version of ecs working 2023-12-21 23:33:18 -05:00
Cargo.lock Create graph system executor 2023-12-21 23:33:42 -05:00
Cargo.toml ecs: add commands test and fix Commands 2024-02-24 11:09:26 -05:00
LICENSE early version of ecs working 2023-12-21 23:33:18 -05:00
README.md [lyra-ecs] Add World::get_resource_or_else, update README.md 2023-12-22 12:22:10 -05:00
shell.nix early version of ecs working 2023-12-21 23:33:18 -05:00

README.md

Lyra ECS

An ECS for the Lyra game engine.

Why does it exist?

I couldn't find anything that fulfilled my needs, specifically an ECS that can store arbitrary components without knowing about the types. This makes it easier to implement into a scripting engine that has the ability to create its own components.

Features

  • Archetypes
    • Spawning entities
    • Despawning entities
      • Delete entities from archetypes
      • Find some way to fill in the gaps in component columns after entities are deleted
        • This was done by moving the last entity in the column to the gap that was just removed.
    • Grow archetype as it fills up
    • Borrow safety of components inside Archetypes
      • Return Ref and RefMut from borrow queries
  • Querying components from archetypes
    • Views
    • Mutable views
  • Resources
  • Get resources in views somehow
  • Relationships (maybe this can be done through queries, idk)
  • Dynamic queries
    • Needed for scripting engines that can create their own components that Rust does not know the types of.
  • Systems
    • Dispatchers/Executors
      • Execution graph that follows dependencies
  • Track when components on entities are changed