This is a simple question, relating to The Entity Component System.
In a nutshell, i have a use case which has ecs managing thousands of objects which are never visible to the player directly, and, as such, do not need rendering, or even to be moved every frame, so i wanted to set up a situation where i could tell a system to only process a certain number of entities of a certain type per frame.
I have succeeded in getting an entity to correctly time itself, and track being moved once every 3 seconds, however with no access to other entities timers, i am unable to stagger them.
All i need is to figure out a way to get a global int value into the burst compiled code which refuses to access a static class directly or anything similar.
Please be aware, i am new to ecs, rather than asking for my code, please answer this question…
“How can entities share a counter and react to the counter together?”
Thanks!
[Edit]
To clarify, the very specific description is, i want to process a fixed number of the objects per frame, then, next frame, process the next few objects, so i suppose its possible to set up some system to dictate and calculate just this? the only way i can think of would be to have that system iterate all these entities, count a few whose timers are over 3 seconds, then tell the rest to keep counting whether they’ve hit 3 or not… So i guess i could make that system set a bool on my moverdata and be sequenced before the mover, but that seems overcomplicated.
Any ideas would help ![]()
[Edit2]
Usually, an answer with a code snippet is invaluable, but due to the nature of ecs being a new system (to me) i think an answer without code snippets might be better, as its the concepts i need, and i wont learn much if its just given to me wrapped in a bow ![]()