Module crystalorb::client::stage [−][src]
Expand description
The Client
undergoes several stages of initialization before it is ready to accept
commands and be displayed to the player’s screen. The enums in this module provides access to
different functionality depending on what stage the Client
is at:
Stages
Stage 1 - Syncing Clock Stage
In this first stage, the Client
tries to figure out the clock differences between
the local machine and the server machine. The Client
collects a handful of “clock
offset” samples until it reaches the amount needed to make a good estimate. This timing
difference is necessary so that the Client
can talk to the Server
about
the timing of player commands and snapshots.
You can observe the clock syncing progress by checking the number of samples collected so far and comparing that number with the number of samples that are needed.
Stage 2 - Syncing Initial State Stage
The second stage is where the Client
waits for the first Server
snapshot to arrive, fastforwarded, and generally be fully processed through the
client pipeline so that it can be shown on the screen, to flush out all the uninitialized
simulation state.
Stage 3 - Ready Stage
The third and final stage is where the Client
is now ready for its display
state to be shown onto the screen, and where the Client
is
ready to accept commands from the user.
Structs
Ready | The client interface once the client is in the ready stage. |
SyncingClock | The client interface while the client is in the initial clock syncing stage. |
SyncingInitialState | The client interface while the client is in the initial state syncing stage. |
Enums
Stage | This is the immutable view of the client’s stage that is returned by
|
StageMut | This is the mutable view of the client’s stage that is returned by
|