Blah blah maybe off topic:
You could have a mix of both (bricks and components).
In true Entity/Component/System systems (ECS) the components are just data markers attributed to game objects, then some kind of manager system when running would iterate over the objects having some components.
For instance, in Unity, cameras are like an empty on which you install a Camera component. The rendering system would be aware of all game objects with the camera component and track the active one for the rendering.
In the BGE, a Camera is a specific subkind of game object that the scene tracks to make the render.
The ECS system would be more modular in the way that you could come up with your own set of Systems and Components, so much more modular. Of course such an engine usually provides the basics to make games, so you must have at least a builtin rendering system, maybe that could be overriden.
Anyway, Components in UPBGE look like Unity components (MonoBehaviour): they aren’t just data (although they can store data, that you can parameterize in Blender’s UI when editing your game). The components also execute a bit of logic on two events: on start (once), and on each logic frame (everytime).
If I am not mistaken, currently components that don’t implement the update
method will make the game exit, because the engine expects the objects to have both start
and update
methods. So you will have to create a function that will be called but do nothing. Maybe a waste of processing, even little, but so far no one really needed more. (Bear in mind that the perf impact that this has is absolutely negligeable unless you have in the 1,000,000 objects with components).
On the other hand, you could have a component to store data, and access them from a Python controller script on a particular event, doing some processing at that point (instead of on each frame). That’s what I was thinking about when I said you could do both (bricks and components).
But you should just use what you feel more comfortable with, unless you want to share around, components usually have less requirements when sharing them, when bricks you might need a specific brick setup that could bring problems in your current design. Although components can have their issues depending on the way they solve the task they are meant for.