-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial turn timeout implementation #2441
Conversation
Clarify what the third |
@geoffthemedio Added more detailed options description.
|
Perhaps rename to turn maximum interval, and turn fixed interval? |
@geoffthemedio Renamed. I suppose those options already have a |
Added TURN_TIMEOUT message with remaining time before turn advance. |
I moved here code to show remaining time in UI. |
@@ -1402,6 +1402,15 @@ Count of minutes after the cookie record will be considered expired. | |||
OPTIONS_DB_PUBLISH_STATISTICS | |||
Enable sending empire staticstics to the player. | |||
|
|||
OPTIONS_DB_FIRST_TURN_TIME | |||
Absolute time point in format "2019-01-20 11:59:59" in UTC. If empty, first turn advance will happen after expiring interval. Requires fixed interval to be enabled. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does a fixed time for ending the first turn require fixed turn time intervals to be enabled...?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If fixed interval disabled, WaitingForTurnEnd
clears all timers set before. I couldn't quickly find solution to fix it.
When quickstarting a single player game, I get this in the logs: |
@geoffthemedio Oh, I suppose I should handle |
Fixed in #2453 |
This PR add three options to manage turn timeout:
network.server.turn-timeout.first-turn-time
- absolute time in format "2002-01-20 23:59:59" when first turn advance occured. Requiresfixed-interval
to be enablednetwork.server.turn-timeout.max-interval
- maximum interval in seconds between two subsequent turn advancesnetwork.server.turn-timeout.fixed-interval
- if enabled intervals should be strictly equals to have predicted turn advance time. Without it turn interval could be shorter if all players are ready or longer if turn processing time exceeds timeout.Each new turn or for each new player connection it sends TURN_TIMEOUT message with seconds remaining before turn advance or 0, if disabled.
New UI control shows remain time and update it each second:
This PR doesn't allow to edit option.
Forum thread: https://freeorion.org/forum/viewtopic.php?f=9&t=11234