3 ms·
Thank you for the beautiful explanation! I understand now, and am kind of excited to try this out in my next gamejam.
by moldavi 5y ago
Thank you for the beautiful explanation! I understand now, and am kind of excited to try this out in my next gamejam.
- meheleventyone 5y agoBefore 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.