PDA

View Full Version : FGU issue that maybe is connected to UDP



KervyN
May 19th, 2020, 10:37
Dear Smiteworks,

WARNING: This is not meant to be harsh or in a "I know everything and you failed with your development" rant.

I would like to know why you switched from TCP to UDP.

Yesterday I had some weird issues that would absolutly fit into the "UDP paket got dropped" schema:
* one of my player did not see new entries in the combat tracker but still saw a meanwhile hidden enemy.
* Reconnect did non work until I kick the player because FGU said she was already connected.
* "next actor" button did not work for all of the players.
* rolled dice where sometimes only visible to some players.
* Only 2/5 Players had said issue. I asked them and both were customer by a very cheap ISP known to use CGN.

My Setup:
* I created a LAN game, because the cloud games are really slow currently (no offense).
* I have a hostname (fg.burgomaster.de) which gets and kept updated dynamicly when my gaming system boots.
* I have a monitoring server outside my home network that checks for packet loss via TCP and UDP to my network which recorded ZERO packet loss. (I can not monitor PL to my players)

From my "network administator" point of view, UDP is far behind TCP when you want to keep stuff in sync, because TCP resends packets when the other side does not say it got the packet. UDP is fire and forget. When a packet drops for any reason the sender does not know that the receiver did not get it and the receiver does not know that the sender sent a packet.

As someone mentioned on discord:
Speculi

I'm relatively certain they picked the technology provided by Unity and the networking library which is UDP with additional message resending etc on top. Not uncommon for games. Either use a mix of UDP and TCP, or have a layer on top of UDP for any information that has to be send reliably. UDP just has less overhead than a TCP connection. For FG it shouldn't be something to worry about (TCP performance umplications). They just took the provided technology to build upon...

I haven't read about the network layer in unity, except " QosType.Reliable delivers a message and ensures that the message is delivered, while QosType.Unreliable sends a message faster, but without any checks to ensure it was delivered." (src: https://docs.unity3d.com/Manual/UNetUsingTransport.html)

Maybe it is just an issue with the latest version? Does FGU tell me, when my players connect with an outdated version? I didn't saw something in the chat.

I really really love FG and it makes my DM life sooo....oooo much easier. But when my players have such issues I need to stay with FGC.

Trenloe
May 19th, 2020, 11:35
When the community first learned that FGU was using UDP a few of us raised this same issue with SmiteWorks.

The devs replied and have mentioned in the forums also:
- most gaming platforms use UDP - so it made sense for them to use UDP to fit with Unity and the brokering services they were going to use.
- FGU uses UDP libraries that make it more like TCP - but at the application layer rather than the transport layer.

Form the FG devs: "all of [the libraries] communication is UDP; including a ReliableOrdered channel type to ensure data arrives in order and reliably."

I wouldn't rule out that there could be issues with the libraries (i.e. bugs in the libraries). However, in theory, these libraries should avoid the issues you mention with just using UDP as-is.

KervyN
May 19th, 2020, 16:03
I see.

Well, when you use something like unity you should not need to think about how the connection is working. :-)
I am just abolutly clueless how to solve the problems we got. I already thought about a vpn tunnel via TCP, but that would be really bad :-/

Neovirtus
May 19th, 2020, 16:19
I see.

Well, when you use something like unity you should not need to think about how the connection is working. :-)

True, by the time the software comes out of Beta you should not need to think about how the connections are happening. During Beta however, we are trying to help them fix these issues by reporting bugs and giving them connection logs. That is what we are here for!


I am just abolutly clueless how to solve the problems we got. I already thought about a vpn tunnel via TCP, but that would be really bad :-/

The devs don't expect you to! Just report the issues you see so that the people who do know how to solve these issues can do so!

pollux
May 20th, 2020, 15:47
I would like to know why you switched from TCP to UDP.

Yesterday I had some weird issues that would absolutly fit into the "UDP paket got dropped" schema

They switched because UDP is the standard protocol in in video game programming frameworks. UDP is a BETTER protocol for low-latency applications because it allows the application to implement its own retransmission policies so they can control latency/reliability tradeoffs in a way that isn't possible on top of TCP. While FGU doesn't have low-latency requirements that preclude TCP, most video game networking frameworks are written on top of UDP so they can be used by low-latency-requiring games... and so if you pick a good video-game-oriented networking framework... you are likely to end up picking UDP transport as a side-effect even if you don't need it.

None of the bugs you're observing are related to conventional UDP packet loss. In network troubleshooting threads I've seen Moon Wizard talk about delivery queues in a way that implies their using the retransmission/reliability features their networking library provides on top of UDP.



- most gaming platforms use UDP - so it made sense for them to use UDP to fit with Unity and the brokering services they were going to use.
- FGU uses UDP libraries that make it more like TCP - but at the application layer rather than the transport layer.

Form the FG devs: "all of [the libraries] communication is UDP; including a ReliableOrdered channel type to ensure data arrives in order and reliably."

This ^


I am just abolutly clueless how to solve the problems we got. I already thought about a vpn tunnel via TCP, but that would be really bad :-/

If it helps, there's nothing terribly bad about running FGU through a VPN on top of TCP. It would mean that TCP's retransmission policies are acting underneath FGU's retransmission policies and possibly resulting in something other than the lowest possible packet latency... but FGU is not terribly latency sensitive. Whether a packet arrives in 25ms or 150ms quite probably doesn't matter at all, unlike in a FPS game where that's the difference between a hit and a miss. If it does help, it won't have anything to do with UDP's lack of built-in retransmission though... it will be that you've hidden the traffic from your ISP and thus prevented them from doing some filtering or processing that breaks things.