This is something that has always bothered me. While I’ve seen it mentioned, I don't think that I have ever seen it mentioned as a bug. And yet it definitely is a bug. I think that there is an off–by–one bug when determining when the current construction cycle ends, and it is easily demonstrated.
I am running a very casual game at the moment. In this game I have sent some colonists to Mars, and they are getting restive. Obviously I need to make a ship with a weapon, or send some troops over there, to prevent them from having unrest. Since I haven't done that yet, there is a message at the end of every single construction cycle that tells me that the unrest is increasing. This is not the bug, it is merely the means to demonstrate the bug.
I have my construction cycle length set to one day, or 86400 seconds. Naturally, this means that I expect to see the unrest on Mars increase every single day without fail. What else could I expect, when the length of the construction cycle is a single whole day?
Yet here is the Events window that I actually see:
If you look carefully, you’ll see that the orange log message only happens every other day. This is annoying.The button to advance the game by a day correctly moves forward in time by 86400 seconds, but the game doesn’t think that the construction cycle has actually ended until at least one more second has passed:
Here you can see that I pressed the “1 Day” button, then the “5 Seconds” button, and the cycle only ended after the extra 5 seconds had passed.
One way to work around this, of course, is to set the cycle length to 86399 seconds instead:
This compensates for the bug, and results in the unrest message happening after every single day.
Does this matter? I guess not very much. As I understand it, what really happens is that construction cycles are variable length. No matter what button you push to advance time, only one construction cycle really happens. Whatever time it is at the end of that process, a single construction cycle of that length is performed, provided that more than the length of a construction cycle has passed. So with it set to 86400, advancing by a day doesn’t pass the test and no cycle is completed. The next time I advance by a day, the length will be greater than the cycle length, so a cycle consisting of 86400*2 seconds worth of construction, research, planetary movement, etc is processed. If I had pressed the “30 day” button instead, then it would have processed a cycle of 86400*30 seconds worth of stuff happening. This is a good implementation because it prevents this bug from being more serious; the right amount of stuff is still happening; it is merely less granular than I intended.
But it’s actually pretty irritating. Leaving aside the fact that I can’t type in “1 day” or “24 hours” or “2 weeks” and have it compute the right value, having it be off by one from whatever I do type in is just uncomfortable. And the fact that log messages alternate days (or weeks) must certainly be confusing to new players.
And it seems to me that the fix ought to be really easy, just a matter of changing one greater–than to a greater–than–or–equal–to test.
Please?