Sorry, we don't support your browser.  Install a modern browser

Latency/ping detection#1909


I’d like to have a function that retrieves player pings (latency, in milliseconds) for use in scripting, or alternatively, I’d like it to be read-only member variables of the Player instance. I want to do timing-based events, but in order for it to be fair for all players, I need to know each person’s ping to the both the host and other players.

My goal is to have a way to determine who clicked on a scripted buzzer the fastest for a trivia game, but I need to account for latency to prevent the person with the lowest ping from having a higher likelihood of winning. The person reading the question unlocks the buzzers immediately upon finishing reading, and then a part of the table lights up to alert players that they’re allowed to buzz. After disqualifying anyone who buzzed early, I want to check pings to see who buzzed first while accounting for when each person heard the question reader stop speaking.

This would allow for a close approximation of real-time trivia and other timing-based events and would bypass latency advantage. It would also make it possible to have scripted outcomes for games that currently rely on players at the table determining who spoke or acted first in timing-based games.

To make this work, it would also be important to know if the in-game voice communication is routed through the host or if it’s sent directly from the person speaking to each other person at the table. It doesn’t go through the host first, does it?

3 months ago