Entity Component System, reactive systems

Reactive systems are systems that can detect changes on filters and process them. They are implemented at Entitas ECS framework too, but not at buitlin-unity ECS. Are they useful at all?

Reactive systems are systems that can detect changes on filters and process them. They are implemented at Entitas ECS framework too, but not at buitlin-unity ECS. Are they useful at all?

Maybe, for some rare cases, but for me - totally not. After few months of developing game powered by my ECS framework
I found that better to use pure Run-systems with clean logic and set proper execution order of them instead of using some magic of Reactive-systems:

  • It’s faster - no need to do any additional checks for doubles before adding entities to processing list.
  • It’s eats less memory - no need to keep local list for entities at each Reactive system.
  • 2 types of reactions (delayed / immediate) - not clear to end user.

For performance reason I made decision not use Reactive-systems at all by myself and added optional preprocessor define, that can eliminate this part of ECS framework:

1
LEOECS_DISABLE_REACTIVE

This definition allows to decrease end size of ECS assembly code and adds additional performance boost.