LCKB
show ping under radar - Printable Version

+- LCKB (https://lckb.dev/forum)
+-- Forum: ** OLD LCKB DATABASE ** (https://lckb.dev/forum/forumdisplay.php?fid=109)
+--- Forum: Guides & Help Section (https://lckb.dev/forum/forumdisplay.php?fid=193)
+---- Forum: Help & Support (https://lckb.dev/forum/forumdisplay.php?fid=157)
+----- Forum: Ep4 Support (https://lckb.dev/forum/forumdisplay.php?fid=128)
+----- Thread: show ping under radar (/showthread.php?tid=5043)



- deudas2 - 04-29-2023


Hello everyone, could someone send me the system to see the ping under the radar? ?




- nicolasg - 04-29-2023



3 hours ago, deudas2 said:




Hello everyone, could someone send me the system to see the ping under the radar? ?




There is no ping system, at least not public, most of the idiots show the rendering time, thinking that it is the latency between client server...




- Andrein95 - 04-29-2023



8 hours ago, nicolasg said:




There is no ping system, at least not public, most of the idiots show the rendering time, thinking that it is the latency between client server...




In client side, speaking about November source there is a:

 

ENGINE_API INDEX iPing;

In Engine.cpp that is used inside Player.cpp (.es)

 

{for (INDEX iPlayer = 0; iPlayer < ctPlayers; iPlayer++) {
CTString strLine;
CPlayer* penPlayer = _apenPlayers[iPlayer];
INDEX iPing = ceil(penPlayer->en_tmPing * 1000.0f);
CTString strName = penPlayer->GetPlayerName();
strStats += PadStringRight(CTString(0, "%d", iPlayer + 1), ctRankChars) + " ";
strStats += PadStringLeft(CTString(0, "%d", iPing), ctPingChars) + " ";
strStats += PadStringRight(strName, ctNameChars) + " ";
strStats += "\n";
}}

This label in this case is completely misleading?

 

BTW It's possible to implement natively using Boost Asio, correct me If I'm wrong.

This is pretty old but make sens:

2




- nicolasg - 04-29-2023



1 hour ago, Andrein95 said:




In client side, speaking about November source there is a:

 


ENGINE_API INDEX iPing;


In Engine.cpp that is used inside Player.cpp (.es)

 


{for (INDEX iPlayer = 0; iPlayer < ctPlayers; iPlayer++) {
CTString strLine;
CPlayer* penPlayer = _apenPlayers[iPlayer];
INDEX iPing = ceil(penPlayer->en_tmPing * 1000.0f);
CTString strName = penPlayer->GetPlayerName();
strStats += PadStringRight(CTString(0, "%d", iPlayer + 1), ctRankChars) + " ";
strStats += PadStringLeft(CTString(0, "%d", iPing), ctPingChars) + " ";
strStats += PadStringRight(strName, ctNameChars) + " ";
strStats += "\n";
}}


This label in this case is completely misleading?

 



BTW It's possible to implement natively using Boost Asio, correct me If I'm wrong.

This is pretty old but make sens:

2




I would have to investigate the subject, but ¿is there a possibility that it is to measure ping with the local server?




- Andrein95 - 04-30-2023


/index.php?/profile/14423-nicolasg/&do=hovercard" data-mentionid="14423" href="/index.php?/profile/14423-nicolasg/" rel="">@nicolasg Since LC has the skeleton of Serious SAM I can agree with you. 

This code, that all have in november source works and tells for my computer 35-40ms.




- nicolasg - 04-30-2023



10 hours ago, Andrein95 said:




/index.php?/profile/14423-nicolasg/&do=hovercard" data-mentionid="14423" href="/index.php?/profile/14423-nicolasg/" rel="">@nicolasg Since LC has the skeleton of Serious SAM I can agree with you. 



This code, that all have in november source works and tells for my computer 35-40ms.




if you have the client and the server on the same pc, that latency is simply impossible, if on the other hand you have the server on another pc, you can simulate latency to confirm that what you are seeing is really the calculation of latency between client server. for example in linux i use "tc qdisc add dev enp3s0 root netem delay 200ms" for add 200 ms of latency and "tc qdisc del dev enp3s0 root" for back to normal