Re:React Game Kit
by talldan on Friday September 16, 2016 @07:58AM
(#12513379)
I'm curious about functional approaches to game programming. I don't have those ~30 years of experience though.
One of the key differences between React and an Entity Component system is that React encourages a single source of state to be passed into the top of the tree, and then that state filters down to leaf components. A component can be said to only be coupled to the abstract contracts of its children.
What I understand of an Entity Component system is that entities are largely responsible for managing their own state. From what I've seen, this leads to a fair bit of undesirable code, with entities trying to discover state from other entities, leading to some unfortunate coupling.
I might be wrong though, so would be interested to hear if that's the case, and if anyone knows of any pointers to interesting approaches.
One of the key differences between React and an Entity Component system is that React encourages a single source of state to be passed into the top of the tree, and then that state filters down to leaf components. A component can be said to only be coupled to the abstract contracts of its children.
What I understand of an Entity Component system is that entities are largely responsible for managing their own state. From what I've seen, this leads to a fair bit of undesirable code, with entities trying to discover state from other entities, leading to some unfortunate coupling.
I might be wrong though, so would be interested to hear if that's the case, and if anyone knows of any pointers to interesting approaches.