Reconsider Ashley's UUIDs
dsaltares opened this issue · 3 comments
The current implementation of UUIDs is pretty useless - letting users implement their own system is better.
In some other ECS implementations, entities are given a reused id (what I like to call "index"); or in some cases, the entity is nothing but an id. This can be used for optimizing component storage, and is also very useful for tracking entities in bitsets (where removing an entity does not need to be O(n)
).
I think that one of the important points here should be ability to set UUID by user. With this feature serialization and entity mirroring (networking) should become much easier.
Taking my words back. @antag99 clearly described correct solution for both cases - self maintainable ids
I don't think it's a good idea to keep unique identifiers; they can easily be stored in components and managed by systems. The idea of an index might be useful for future optimizations, but it's probably not needed yet. I suggest that we remove support for unique identifiers, and let users implement their own components.