Open genaray opened 3 years ago
For desktop users the impact would probably be minimal, except for extreme use-cases. Can't say if it's worth it to fix for other platforms.
There's a couple of managers that still lean on entities also. https://github.com/junkdog/artemis-odb/issues/456
We PoC-ed this in 2017 (see PR https://github.com/junkdog/artemis-odb/pull/499), might contain some salvageable ideas if anyone decides to fork.
Artemis should make use of the full ecs approach. This way we could save a lot of memory and increase the performance. Currently the
EntityManager
still holds a list of "Entity"'s. So every single created entity allocs a new entity object which is a waste of resources. Especially if the user dont want that.My two cents, we should replace the
Bag<Entity>
with a traditionalIntBag
to store the entities. On top of that we could still construct theEntity
class if the user wants to really, really make use of it.This way we could improve the ram usage and still keep the
Entity
class for those who want to use it.