On Friday, 26 August 2016 at 16:34:26 UTC, MrSmith wrote:
Your solution is basically OOP with composition used. It is enough for convenience, but not enough for speed. Also memory allocation for each component looks scary. Systems simply iterate over a all entities that have given set of components. Check my solution API https://gist.github.com/MrSmith33/e861a289d295ec4659a0 I have query maker that iterates over smallest collection and gets other components. Full code is here https://github.com/MrSmith33/voxelman/tree/master/source/datadriven. WIP. Here is example of usage (single component used here though) https://github.com/MrSmith33/voxelman/blob/master/plugins/test/entitytest/plugin.d

What I can conclude so far is my approach uses a lot of processing power. I did a test where I generated 10000 entities and it drained my CPU to 50%.

All feedback is appreciated. Thank you for your input :)

Reply via email to