Hey everyone,
current scenario: I make a production system and have to use any kind of timer for this (to produce after X seconds and to check every Y seconds if missing input goods are now there).
In the tick function I would most of the times just increase an ElapsedTime float and check like 2 or 3 bools and only every few seconds execute a “real”, consuming function.
I’m doing it in c++ so it is not that heavy as in BP, but still from what I have heard, ticking like up to 1000 components is performant. So here are my current ideas to do this:
- Make every component tick
- Give every component a looping timer that executes something like each second
- Register the components to some kind of controller, that has a looping timer for 1 second and notifies every registered component that a second is elapsed. Not sure if this is better, if you have like 500-1000 components to loop through.
So, which of these implementations is the best and do you have a better idea for this?
Would also be interested in some testing how many timers have a significant effect.
Thanks in advance!