(no title)
ncake
|
4 years ago
Unpopular opinion, but I personally think ECS has no place in C/C++ game dev. Every supposed advantage is either curbed by limitations of the language (e.g. serialization) or can be implemented more logically in a stateless manner.
jayd16|4 years ago
How would you implement ECS, a system for tracking the state of game entities, in a stateless manner? Can you expand on that?
ncake|4 years ago
Stateful way: your Inventory Manager component iterates through its private array of item entities to mark their model components as shown or hidden, then calls the dependency injected character's avatar component to update its animation state.
Stateless way: you flip an integer in character's struct, and the rendering function does something different.
BoorishBears|4 years ago
verdagon|4 years ago