com.unity.netcode.gameobjects
com.unity.netcode.gameobjects copied to clipboard
Bug Regarding RTT/Ping
GetCurrentRTT doesnt work very well in some condition.
- This GetCurrentRTT is a framerate independent, when framerate is lower or higher it will change the RTT value slightly.
- Using INetworkSerializable will disturb the RTT calculation.
Adding to this as I've tried to make a network debug overlay in game similar to what Counter Strike has. (these apply to NGO 1.8.1, and I'm using the UnityTransport)
- GetCurrentRTT only works on the server. On clients it returns 0.
- There isn't a publicly accessible way to get packet delay, packet jitter, etc. I tried to investigate the multiplayer tools package, but have struggled to find a solution
@LightPat @byonfysx I am starting to migrate some examples out to the public repository. Currently they will be created with NGO v2.0.0 but I do plan on migrating most of them to v1.x in the future.
You might take a look at this PingTool that could provide you with the foundation of what you are trying to accomplish. It comes with RNSM integration and such.
It provides a fairly stable RTT to the server (from clients) and RTT to the clients (from a Host) and also a ping to each client so you can see how long a message would take to send from point a to point b and be processed.
Hi, also have a bug where changing the tickrate wont impact the RTT.
@byonfysx Did you look at the the PingTool I linked to above?
Changing your tick rate should not impact your (R)ound (T)rip (T)ime message calculations provided by UTP or the ping RPC included in the ping tool. Tick rate is the frequency in which NetworkVariable properties and NetworkTransform components will send state updates (if any need to be sent) and will increase the frequency that the NetworkTickSystem.Tick event is invoked.
RTT is to get an estimated average time it takes for a message to be sent and an ACK to be sent back as a response the message was received within the UTP reliable pipeline. The ping tool's RPC provides an estimated time it takes to send a message to a specific client and have that message processed on the targeted client side.