How does ZayES compare with Ashley?

In code you could do that: ed(yourEntity.getId(), Unremovable.class) even when you do not have it in the entity set. You will get it if it’s there or get null if not. No clue if that is good or bad practice. The questioin is more why hitpoints for those unremovable entities at all, that smells a bit. Somhow.

It seems bad that a system do not process when a component is present. It make the system reactive to something it should not care about. When you will extend that, you will certainly find yourself coding odd things :

“If Entity has component A but not B, not C, not D, not E…”

A system gives an entity a behavior if it has a component. Not an absence of behavior in absence of component.

You might look at it in the inverse way :

  • a ToRemove component and the associated system that remove the entity, whatever the other components,
  • a LifeDepleted component and the associated system, that place or not the ToRemove component, depending on its own logic
3 Likes

Don’t mark them as EOL if they are unremovable.