# ECS : Can systems have sub-systems?

I am searching about "sub-systems" in ECS but I don't find any article speaking on that. Considers this simple example:

struct Engine
{
MoveSystem move_system;
CollisionSystem collision_system;
RenderSystem render_system;

void PhysicsSystem::update()
{
move_system.update();
collision_system.update();
render_system.update();
}
}


We can make a physics_system which will be the aggregation of the physics_system and the collision_system.

void Engine::update()
{
physics_system.update();
render_system.update(); // No change
}

struct PhysicsSystem
{
MoveSystem move_system;
CollisionSystem collision_system;

void PhysicsSystem::update()
{
move_system.update();
collision_system.update();
}
}


Is it a bad practice? I could not see any drawback since it looks like just a pure change-big-class-into-many-smalls refactoring without logical changes.

• As a general rule, I'd work under the assumption that everything is permitted until you encounter a specific prohibition or problem. Then ask about that specific problem once you've demonstrated it. Apr 27 at 11:54

2. Is it a bad practice? Maybe. PhysicsSystem is not characterized as a system. It does not focus on entities with certain properties. It is only used to organize some other systems. So maybe PhysicsSystem is a System Group instead of system. System Group is a common concept in ecs system, usually used to organize the update order. You can search it with "system groups" as key-word instead of "sub-systems".