Posted: 10th Jul 2023 18:28
and about ping in ms ? Arch-Ok

are u using socket tcp ?? smerf
Posted: 10th Jul 2023 18:31
I'm trying to check the ping in milliseconds, look at the result I'm having: https://prnt.sc/HLyTSh5kXzXR ( (I don't understand why the response is taking many milliseconds according to the screenshot) )

every 5 seconds a message is sent, and the server responds.
every time the message is sent the timer is reset and timed again, when I receive the message from the server, I get the milliseconds with : agk::Getmiliseconds() to get the time in ms that it took until the response reached the client .

Is this the right way to get the ping?
Posted: 12th Jul 2023 19:49
Thought I replied to this already but i guess not. If your connection is local and it is taking a long time then it is limited by sleep or sync command. a server should run headless as possible without an interface/gui. so if you are using syncrate() on your server dont. use a loop scan rate n run your sync off it. so if loopcounter=400 sync() or render swap this will allow 400 loops before it tries to print to the screen good for hitting a few hundred clients a ms with data. Also using the round robin method help alot. You process 1 message per player per loop so not looping through each clients messages and then the next client. I recommend a message queue. You are checking correctly for milliseconds. and yes im using socket tcp and udp.