friflo / Friflo.Engine.ECS

C# ECS 🔥 high-performance
https://friflo.gitbook.io/friflo.engine.ecs
GNU Lesser General Public License v3.0
158 stars 11 forks source link

[Question] What's the differences between `Tag` and `Component` in the framework #22

Open inmny opened 1 month ago

inmny commented 1 month ago

I find that entity is copied fully no matter change(add/remove) tags or components. It seems that component is already sufficient and tag is useless.

And is there plan to implement changing tag more lightly?

chrisfls commented 1 day ago

@inmny

Adding or removing components—performing structural changes—alters the archetype to which an entity belongs. The cost of this operation increases as the number or size of components in the entity grows. Tags are used to flag certain entities without causing these structural changes.