3 ms·
Before you do I’d add the implementing this isn’t necessarily straightforward and that your game might not benefit from anything more snazzy than sparse arrays.
by meheleventyone 5y ago
Before you do I’d add the implementing this isn’t necessarily straightforward and that your game might not benefit from anything more snazzy than sparse arrays. It’s definitely intellectually satisfying though.
For example if your game has only tens or hundreds of entities a sparse array approach might work fine even if they’re very heterogeneous. There simply isn’t enough to iterate over to matter. That said the overall performance difference between the two at that level is unlikely to be much but the archetype approach introduces a lot of complexity.