Hello!
I am about half-way through the development of my game’s engine and the next big hurdle for me to get over is the fact that I’m looking for a persistent overworld that appears to act independent of the player’s actual scene location.
Here’s a brief explanation of how the game will play out:
The player is on a Final Fantasy/Mount Blade type overworld where he can move freely through the overworld. All the while the AI is spawning merchant caravans, bandits, armies, etc. These spawns are very important because the game is considered an economic simulation (as well as its other genres). So a merchant caravan that goes through bandit territory is likely to be destroyed. Merchants that successfully reach their intended destination affect the supply and demand of the region.
The simplest solution is to “pause” the overworld if the player exits the scene. This, unfortunately, conflicts with the city-building aspect of the game which is supposed to run in real time.
So, here I am, completely lost as to what my options are. In short: what are some solutions to allow a dynamic and persistent overworld even if the player is not present?
The only solution I can come up with is to have a single scene with the overworld and all of the various towns on different vertical “levels” of the scene and simply not render the unused locations. This seems like an extremely sloppy and horrible way to solve this problem though.
Any brainstorming you can help me with is greatly appreciated.
You are talking about a single player game, right?
In this case it is not necessary to have your game updated in real time, it just has to look like it was!
If for example a building has 10 minutes of construction left but your player is “away” for that time it is sufficient if the building is complete when the player comes back to that location, it is not necessary to keep track of the construction all the time.
If you want it accurate, you could even simulate everything what happened when you are back in the scene. If you skip rendering you could run thousands cycles of simulation in a second or two.
Or you just vary the different values by a random amount dependent on how long the player was actually away.
Such a system could also help if you want to implement a fast forward option or want to run automated tests…
To make something look like it happened over time when you’re away from it, you don’t have to have it happen in the background. If you know how long it will take, and the time at which it begun, you can calculate the current state of the thing in question by simply interpolating with the current time.
completion = Mathf.InverseLerp(startDate, startDate + completionTime, currentDate);
completion will be a float ranging from 0 to 1, representing how far along you are at the current point in time.
Note how I wrote currentDate, instead of something like Time.time or such. That’s because you will most likely want to keep track of your own game time value, which you update independently. That UniversalTime value then becomes your go-to value for anything that relies on time elapsed in the game world. You can easily pause it, or make it run faster or slower, simply by modifying how you step it forward.
// in a FixedUpdate loop somewhere
UT += Time.fixedDeltaTime * timeWarpFactor;
Notice that with this scheme, you don’t have to update the state of the thing in progress constantly. It becomes a function of time, because you know in advance the date at which it will be complete. You then just have to store the start date and either the completion date or time required to complete, and update the state of the thing when you return to it.
It’s all smoke and mirrors… and maths. 
Cheers