ZeusWPI / MOZAIC

MOZAIC is the Massive Online Zeus Artificial Intelligence Competition platform
GNU Lesser General Public License v3.0
13 stars 6 forks source link

Latency information #270

Open iasoon opened 6 years ago

iasoon commented 6 years ago

A long long time ago, we talked about showing latency information in a lobby. Because we have reliable networking now and all packets get acked, we don't really have to do anything special to get latency information (just time how long it takes for us to receive an ack). The connection code could then keep track of this.

But then, how would we introduce this information to the lobby? We cannot read the value directly from the connection (the game code does not have access to that). In the current system, the only way would be to send an event to the lobby (and this is probably also the right way to do it). But how would we do this? Periodically send a 'network info' event? emit an event each time there is a significant change in ping? What would be the sensible (or wild and genius) thing to do?

wschella commented 6 years ago

Periodically sending a Network Info / Heartbeat event seems POLA and simplest.