Hacker News new | ask | show | jobs
by a-nikolaev 1177 days ago
A collection (e.g. an array or a hash map) that stores things. Maybe more than one collection like that, different for each type of entity: monsters, items, etc. (Separate code paths to handle these different types of things.)

Keeping indexes/keys for references, and loops over these collections can do a lot without any upfront complexity of an entity system.