Originally Posted by
Jovias
So, I've been reading up on this error, and I have an idea as to why this is occurring. Perhaps this will shed a bit more light to supercell employees.
So, from what I understand here, anytime a server related action takes place, the countdown timer will then display an incorrect time remaining toward the completion of a project within the game.
Is it possible that there is a function pausing the timer, or preventing communication with the server on a small scale level?
To clarify, you prioritize a server response before the timer's server response, and thus, with each passing response taking a priority, even in milliseconds, over the timer, it will be held back ever so slightly each time, incorrectly displaying the build time for each building.
Wouldn't the solution to this be a service call, which took time started on the server, then the player logs in, and it will subtract the current time on the server?
So, to put number into this:
Let's say Jim, starts building his town hall at 12:00PM. For the sake of this example, the town hall takes an hour to build.
The server then records that Jim started construction of his town hall at 12:00HR.
Jim then goes off and does a bunch of other server related junk with the game and returns to his town.
Server will then do the following calculation: CurrentTime - StartTime = RemainingTime.
So, Since the server already has the value for StartTime = 12:00HR, it obtains the information for CurrentTime = 12:30HR, then it determines that Jim has 30 Minutes, and displays a countdown from that point.
In terms of doing this over longer periods of time. Such as days, then you could alter the way time is recorded.
So in terms of recording the time. You will have YR:MNTH:DAY:HR:MNT
So StartTime, instead of appearing as 12:00, would instead appear as 2014:01:23:12:00
Thus, when the calculation takes place. it would be: ((2014:01:23:12:30) - (2014:01:23:12:00)) = 0000:00:00:30
Alright, I think I worked this out in my head.
So, three Variables
TimeRequired
TimeStarted
TimeCompleted
TimeRequired is updated to server when the player begins the structures build cycle. Thus 01:00 is added.
TimeStarted is recorded by the server, the exact server time the player began his build cycle. (12:00HR)
TimeCompleted is equal to TimeStarted + TimeRequired which equals (13:00HR)
Now, another two variable: TimeDisplayed & CurrentTime
TimeDisplayed = TimeCompleted - CurrentTime
TimeDisplayed = 13:00 - 12:40
TimeDisplayed = 00:20HR
I think that's what I wanted to get out.
Its a little shifty, but I hope it helps. Maybe this could better regulate time? I don't know. Keep me posted, sometimes I cannot get what's in my head out properly.
*EDIT* I don't want it to seem like I was swearing, i didn't realize a certain word was blocked on here. So, I'm not swearing, I changed the word to shifty.