Entity Component Architecture
MrSmith via Digitalmars-d
digitalmars-d at puremagic.com
Fri Aug 26 09:34:26 PDT 2016
On Wednesday, 24 August 2016 at 17:57:33 UTC, vladdeSV wrote:
> I am searching for feedback. What do you think it's pros and
> cons are? Preformance, memory usage, scaleability, etc?
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
More information about the Digitalmars-d
mailing list