I've been wondering this for some time now: Let's say you have a builder game like Anno and let's say you're in the very late game. You have literally thousands of production facilities placed. Each one of these needs base resources and time to produce an output. Also there's modules you can place onto the facility that give some sort of bonus.
Now: How would you make the game check each one of these and act accordingly (look if job is done, when done deliver output, start new job if resources available)?
The simplest I can think of is a loop over each of the facilities. But that just doesn't feel like a good idea due to the amount of facilities and the frequency on which game loops run.
Another thing I can think of is eventing. The facilities could inform the game core about state changes, but I'm having troubles seeing eventing and a game loop together.
As you probably can now tell I have no exp in game development but would like to get some input on that topic.