kgorking / ecs

A header-only/importable c++20 implementation of an entity-component-system (ecs), with focus on a simple interface and speed.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rework component_pool chunk storage

kgorking opened this issue · comments

Use something like a sparse_set to manage the chunk storage. Keep them ordered, without the need to move them around too much (swap-from-last erases ok).

Reason:

  • The current implementation was a fun experiment, but it has gotten unwieldy and hard to maintain.

References:

Plan:

  • Create a self-contained range tree that can hold ranges and their data
    • Implement as an AA tree
    • Use a compact layout. New data is filled into current holes or appended to the end.
  • Write algo for tree diff/intersection

Well nuts to that. Wrote an allocator instead.