-1 karma · joined December 11, 2023
What I don't understand, I suppose, is if a Component isn't an object that acts, then what is it?
You could create a database table called "Boss," that contains all the Boss components. Then for each system, you create a function that operates on a Boss.
To me, class-based has one advantage over functional. A component is an object and therefore perhaps ought to be represented by a class.
That being said, functional maybe is a bit simpler.
Imagine all in-game characters have their data in a database. The database might have one or more tables representing an objects ID or another reference, its position, its health points, and image data representing how to draw the object. These three things are "components" and the IDs and references are "entities."
A system is anything that manipulates one of these components. Thus, a function that manipulates a component is a system.
Cool!