Explanation of server time compression introduced by 4.37 U2
-
Hi folks, I had an internal report about a flag I introduced in U2, so I think I should explain this a bit better. First of all, this should be used only by people running servers in standalone mode (where the server sits idly in 3d).
set g_nServerCompressionMode 0
: is the old behavior (before U2).set g_nServerCompressionMode 1
: this causes the server to be automatically paused in 3d if there are no players connected to it. If there are players connected, then it works as before U2.set g_nServerCompressionMode 2
: this is the cool value IMHO. Without players connected, server will pause. But when there are players connected, players will be able to control the time compression and server will comply.This is useful for cases where players have a flight one hour from now. The server will simply accept the time acceleration up to a limit (given by
g_nServerModeMaxCompression
, which is 16 right now and must be a power of 2 [1, 2, 4, 8, 16, 32, 64]).As usual, let me know how it works for you. This is something I implemented based on my squadmates feedback and I would appreciate if you have any feedback about it.
-
(I think all this is missing from technical-manual.pdf…)
What are the rules – can the host un/pause in 3d? In mode 2 can any player pause and/or control time acceleration?
@Seifer said in Explanation of server time compression introduced by 4.37 U2:
players will be able to control the time compression
-
@Seifer This is a welcome addition to server management, as it will be nice to put the server in 3D, and move onto client briefing, with the ability to push the clock to ramp time when everyone is ready. Only risk I see is ability of any client to control/change compression inside 3d world. overtly / inadvertently?
-
Thanks for the questions, let me try to address them.
First of all, let’s explain how the old way works because this is a bit tricky, specially the pause part.
The old way aka
set g_nServerCompressionMode 0
, the defaultTime compression in network games works as a “consensus or lowest value wins” of all players connected to the game. So, if a player has 1x, others have 16x, the result will be 1x. Also, to have pause, all players must be in pause state. So, if we have all players paused and one in say, 8x, the result is 1x (pause is slower than 8x, but since its not a consensus pause, result is 1x). To have pause, all players must be in pause state.
set g_nServerCompressionMode 1
If host is in the UI, this works the same as the old way. We need to this so host can create missions when alone (otherwise game would be paused with the host).
If the host enters 3d and is alone, game is paused. We do this to avoid the campaign playing by itself. If there are other players, it works the same as the old way.
set g_nServerCompressionMode 2
If host is in the UI, everything works as the old way. We need to this so host can create missions when alone (otherwise game would be paused with the host).
As soon as the host enters 3d (where it will sit idle there) the new algorithm kicks in. If it is alone, game is paused (so that the campaign does not play by itself).
The interesting part is when other players join while host is in 3d. Essentially, it means that the host will be ignored for consensus/lowest value.
As soon as a player joins the server with the host in 3d, this player is in control of time compression. He can accelerate up to 16 (default value for
g_nServerModeMaxCompression
). When other players joins the game, the compression value will be a consensus/lowest value of all the players (ignoring the host value).So let’s say we have host in 3d, one player in UI 4x and another in 3d (1x). The compression will be 1x (lowest one ignoring host). If the player in UI pauses, compression will still be 1x (not a pause consensus). If then, the player in 3d pauses, it will be a pause (due to consensus).
Now let’s say the player is in 3d, 1x. And the second player wants to accelerate 32x. Lowest value will result in 1x. If the player in 3d goes to 4x, lowest value will result in 4x. If both players go to 8x, consensus will be 8x. If both go to 32x, result will be 16x (respecting host limit).
So answering @Fish44 question, if a player accidently hits pause or 2x or 4x and there are other players, nothing will happen, because it will not be a consensus and lowest value will be 1x. If he is alone, he will pause/accelerate at his will (up to 16x), just as if he were flying single player.
Does this clarify how it works?
-
-
@Seifer said in Explanation of server time compression introduced by 4.37 U2:
Hi folks, I had an internal report about a flag I introduced in U2, so I think I should explain this a bit better. First of all, this should be used only by people running servers in standalone mode (where the server sits idly in 3d).
set g_nServerCompressionMode 0
: is the old behavior (before U2).set g_nServerCompressionMode 1
: this causes the server to be automatically paused in 3d if there are no players connected to it. If there are players connected, then it works as before U2.set g_nServerCompressionMode 2
: this is the cool value IMHO. Without players connected, server will pause. But when there are players connected, players will be able to control the time compression and server will comply.This is useful for cases where players have a flight one hour from now. The server will simply accept the time acceleration up to a limit (given by
g_nServerModeMaxCompression
, which is 16 right now and must be a power of 2 [1, 2, 4, 8, 16, 32, 64]).As usual, let me know how it works for you. This is something I implemented based on my squadmates feedback and I would appreciate if you have any feedback about it.
Works well, thanks Seifer.