434
edits
m (→Prior 2018) |
(→before 2021: main text) |
||
Line 18: | Line 18: | ||
That's what lead to the 2018 change, the need to a clock for the mp protocol, not based on simulated time, but a "real time" timestamp. | That's what lead to the 2018 change, the need to a clock for the mp protocol, not based on simulated time, but a "real time" timestamp. | ||
= before | = 2018 - 2020 = | ||
The multiplayer achitecture (multi server), and the slow mp packet sending rate made impossible a good synchronization with only a server ping, so we moved to a "real time" way of addressing lag issues, helped by the introduction of 2 clocks in TimeManager. | |||
We still have the same way of providing the simulation time dt, with the same characteristics as before, but we added: | |||
* a "steady" clock: this clock start synchronized to the wall clock, then follow the "dt" increment, without pausing and accelerating, using a monotonic timer. The goal is to have the wall clock tuned by ntp or ptp, and the different mp pilot are in time with each other by relying on dedicated network time service. | |||
We provide a way to know if the steady clock is still on time with the wall clock, setting "sim/time/compute-clock-drift" to "true" give the current difference in "sim/time/steady-clock-drift-ms" | |||
* the mpprotocol clock: if the ntp works well, it's the same as the steady clock, but to cope with player not sing ntp, or eg flying with a recorded flight, there's an offset to adjust this mpprotocol clock relative to the steady clock (sim/time/mp-clock-offset_sec). this clock give us the timestamp used in the mp protocol. | |||
This offset is exposed in the lag menu, if you need it :) (more to see [[Real_Time_manual | here]]). | |||
This was a bit of a headhache to add in the TimeManager, but the result is quite good (for who know how to set it up, still need improvement for the end user) | |||
Maybe you've noticed that those changes were made only during winter, so the question is, what needed to be changed this winter ? | |||
=2021 (hopefully)= | =2021 (hopefully)= |
edits