- Home /
ECS turn based
Hey! I am using ECS but I want them to update only once per some defined turn (about two seconds - in the style of Paradox Grand Strategy Games). The passing of the turn is not based on player input but rather on the script counting those turns. Now, I have tried to do a manual update of every JobComponentSystem but that resulted in a massive drop (from 600 to 10 FPS even though it was only done on a testing job that only flipped boolean in a testing component) so I was thinking about flags (WaitForNewTurnFlag and ReadyToHandleFlag).
The turn counting script would send a signal to some ComponentSystem that would change those flags for one frame and then change them back until another signal from the counting script. Do you have any sources I can take inspiration from on how to make this work?
And I am using ECS instead of classes since I am planning on manipulating huge amounts of data and I want to use the speed of ECS for this, even though that math would not be done every frame.
Your answer
Follow this Question
Related Questions
Turn-based vehicle physics 1 Answer
Is this the right program 0 Answers
Business simulation in Unity 1 Answer
Detect the same variable from multiple scripts 2 Answers
how to create turns between 2 players 0 Answers