Ticket #791 (new enhancement)
Lightweight components / reduce overhead for resources
|Reported by:||historic_bruno||Owned by:|
|Priority:||Nice to Have||Milestone:||Backlog|
|Component:||UI & Simulation||Keywords:||resources|
One thing I've noticed with random maps, it's very easy to use large amounts of memory on maps with high resource counts (not yet noticeable on scenarios since entities must be placed individually - the limit being the designer's patience). Presumably this is because every instance of a resource has it's own component objects in memory all the time. Considering a map with thousands of trees, the waste is apparent because not even close to that many trees will be gathered at once and most of the objects will be identical anyway.
A potential solution for this is to use some sort of "lightweight" component for resources. There could be one instance, which stored changing values such as resource counts in an efficient typed array. It's not clear how easy this would be to implement or how much of a change it would require to the component system, if any.