First of all, thanks for the replies! :)
I agree with you guys, but it will be a little weird to do like you guys said. I'll explain why:
If I suspend the game while its Sunny, there is no chance that will be Snowy in the next hour, it's like a cycle, and every weather change has a probability to happe. For example: If it's sunny now, there is 50% chance that will remain Sunny, 40% chance that will be partly cloudy in the next hour and 10% that it will be windy. See the image below:
So let's say that the player went 10 hours offline and then came back to the game... I need to calculate the probability based in this cycle for every hour. Do you guys have any suggestion on how to do that? Nothing comes in my mind when I think about it..
Other ideia that may work here, is creating an online server/site/whatever and make a global weather for each city in the game, so I can "upload" from this repository the last 10 hours weather condition. What do you guys think? Is this possible? Or the other idea is more effective?
Thank you so much!!
your image is not showing..
But, let me suggest to you:
Weather, On_Suspended_Time, On_Resumed_Time, Suspended_Time.
Create a function, "On_Resumed_Simulate"
This functions will run every on resumed.
1 - Store the time to the var On_Suspended_Time;
1 - Store the current time to the var On_Resumed_Time;
2 - Do the math between On_Suspended_Time and On_Resumed_Time to know hours or minutes that the game was suspended and store it to the var Suspended_Time;
3 - Call On_Resumed_Simulate(Suspended_Time);
1 - Receive the amount of hours suspended;
2 - For each hours suspended
2.1 - Compare var Weather = Sunny
2.1.1 - Choose (Rainy, Cloudy) (If you need probability chance of pick, you can use here advanced random, Like 40% of Rainy, 60% Cloudy)
2.1.2 - Do whatever you need after the change of weather, like if it will be on normal, running game..
2.2 - Compare var Weather = Rainy
2.2.1 - Choose (Sunny, Cloudy, Snowy) (If you need probability chance of pick, you can use here advanced random, Like 20% of Sunny, 60% Cloudy, 20% Snowy)
2.2.2 - Do whatever you need after the change of weather, like if it will be on normal, running game..
Im not sure if its clear to understand, but you need to do all the steps every On Resumed on "On_Resumed_Simulate"
Ashley; why the forum does not respect the normal break lines?