8 Second Lag - is it possible to reduce?

Hi,

This is probably more of a connection issue outside of Unity, but since I’m using Unity to do what I’m doing, I thought here would be a good place to post about it.

To test my multiplayer game over an actual internet connection and not LAN, I am using a mobile HotSpot for one client and a VPN connection for the other. The VPN connection is using the same LAN Line as the Master Server (which acts as MatchMaker), but is given a different External IP address so as to allow for all 3 PCs to connect.

I understand using a HotSpot and VPN could be a cause for a long trip, and the average RTT for packets as shown in the Unity Profiler hovers at 260. However, I do not understand how this accounts for an 8 second delay of what first happens on the host’s game (the VPN connection) and then what happens on the client’s game (the mobile connection). And if I were to disconnect the host and client, indeed, the client’s updates from the host continues for 8 seconds before stopping. So, it seems like my packets from host to client is taking 8 whole seconds. My question is - is this normal??? It seems like it would not be. It does not seem to match the RTT Unity shows for my host’s packets. Shouldn’t that be only 260 milliseconds of time? Also, round trip and not one way?

Because of this, I’m thinking something else is in play, causing my problem. However, I don’t see what. My Qos setting for this channel delivering this data is Unreliable, by the way. So it’s not as if packets are stored, and then they start building up, causing a traffic jam of sorts.

Any suggestions as to the problem is appreciated.

Set please NetworkDropThreshold to 80 (in connectionConfig) most probably you have significant packet loss and jitter on mobile end…

Thanks for your reply aabramychev.
Before trying your suggestion, I improved the delay from 8 seconds to 5 or 6 by changing the three values I was sending - that being 3 floats (worth 4 bytes each) to 3 bytes only (for each of the 100 objects).
After trying your suggestion, I did not notice any improvements. By what I mentioned so far, are there any other sugestions as to what the problem could be?
Thanks again for your help.

I found the problem. It was a send rate within my code. It was sending too much too quickly. Slowing it down from this point, I now have a delay of about 0.3 seconds.

it is actually means that i answered too soon. Next time will wait a little bit more, probably problem will be solved by itself :slight_smile:

That’s not the problem. I’ve had too many times of asking for help too soon. : )
I still greatly appreciate that you replied. If I run into any new problem, your suggestion could solve it.
Thanks again!