Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs

Steamworks.gml example

Sample project for Steam-based networking for GameMaker. · By YellowAfterlife

Show LATENCY

A topic by PeperinoPomulo created Apr 20, 2019 Views: 245 Replies: 3
Viewing posts 1 to 3

Hello! Looking at the menu in the example, is there any way to show the current latency next to the name of the creator of the lobby?

Thank you!

Developer

The only way is to establish a temporary connection with each lobby owner (you can add an extra function to the DLL or just steam_lobby_set_data it so that you can retrieve it later) and exchange a few packets to figure out the latency.

Ooh I understand, I wouldn't mind showing the ping once inside the lobby, I think it would be better that way.. so for doing inside the lobby i need to use "steam_lobby_set_data" right?

Developer

The example already bounces "ping" packets back and forth, but you'll need to measure time since the last one to calculate the actual latency.