3 ms·
EnTT's registry might be an interesting read if you haven't read it before. [1] The specs crate also provides a variety of storage implementations for varying t
by danbolt 5y ago
EnTT's registry might be an interesting read if you haven't read it before. [1] The specs crate also provides a variety of storage implementations for varying types of components. [2]
I didn't work on the game, but I spoke with some of the developers of Homeworld: Deserts of Kharak. Since there was a straightforward quantity of entities and components (a bunch of vehicles in a closed desert space), the space for all data was preallocated at initialization time. I can't speak further on the specifics though.
[1] https://github.com/skypjack/entt/blob/master/docs/md/entity.md#the-registry-the-entity-and-the-component https://github.com/skypjack/entt/blob/master/docs/md/entity....
[2] https://docs.rs/specs/0.17.0/specs/struct.VecStorage.html https://docs.rs/specs/0.17.0/specs/struct.VecStorage.html