What is an entity system framework for game development?
richardlord.net
richardlord.net
And then we'd badly reinvented Erlang, in C++. :(
I made a small C++/QT implementation here:
https://github.com/surjikal/cbgos-experiment
And here's a screenshot of a game I built with it:
https://raw.github.com/love-rollercoaster/space-game/master/...
This is supposed to be an 3d asteroids clone, but the asteroid and spaceship graphics components were swapped. So you're controlling an asteroid, and your goal is to destroy spaceships.
So your spaceship might have a 'Climeable' component on it and your infantry might have a 'Climber' component. So only a 'Climber' could go onto a 'Climeable' , but not the reverse.
i.e. Can some of the complexity of a 'true' entity component system by simply reduced to favoring dictionaries and maps instead of static properties?
entity: id
component: id field1 field2 field3...
entity_component: ent_id com_id
Then your tick iterates the Systems, each does a query for the relevant components, applies transformations, and puts back in the datastructure. So your logic is very centralized, and the entity behaviors are basically declared by a combination of choosing its Components and choosing the active Systems.http://research.microsoft.com/apps/pubs/default.aspx?id=2112...
Entity component systems are not true behavior systems: they do not implement subsumption of behaviors as reflexes. Check out Rodney Brooks' subsumption architectures which is 20+ years old now and used heavily in robotics. The Kodu team used this heavily and I adopted it to one of my own languages once:
http://research.microsoft.com/apps/pubs/default.aspx?id=1793...
Elephants don't play chess indeed!