Log in

View Full Version : Unity - Portforwarding?



DC610
August 24th, 2022, 23:06
Do you still need to portforward in Unity? I recently switched to fiber and they dont offer a static IP so i can't portforward. Just asking before i port my classic campaign to unit.

Sulimo
August 24th, 2022, 23:18
No port forwarding is not required (but you can still use it if you want), use the Cloud option when you create your campaign, it defaults to that.

Hosting a game (https://fantasygroundsunity.atlassian.net/wiki/spaces/FGCP/pages/996639879/Hosting+a+Game).

NOTE: The Cloud option is just a connection Broker, the GM's computer is still the 'server'.

damned
August 25th, 2022, 04:21
If you port forward with unity it is UDP 1802 rather than TCP.

Valyar
August 25th, 2022, 16:08
UDP!? Oh.. that's very bad.

Sulimo
August 25th, 2022, 17:47
UDP!? Oh.. that's very bad.

If you are concerned about UDP being send and forget, that's not a concern for modern apps. It is entirely possible to use UDP at a lower level while still having reliability at a higher level in the network stack. TCP has a much higher overhead than UDP.

UDP is fast, and the vast majority of games use it, because it's usually more important to get the data there quickly instead of reliably. If reliability imposes long wait times, it will slow the flow of the game down.

If you can use something higher in the network stack to give reliability, that can work to your advantage, as you can get fast communications and reliability without the necessity of constantly waiting around for an ACK in a TCP conversation.

Trenloe
August 25th, 2022, 18:29
It is entirely possible to use UDP at a lower level while still having reliability at a higher level in the network stack.
This is what Fantasy Grounds Unity does. I can't find the post from a couple of years ago by Moon Wizard that goes into detail, but he basically said that they use a reliable UDP network layer within the FGU application. He also mentioned "most network game libraries are only available via UDP".

Sulimo
August 25th, 2022, 18:31
Yeah, I remember that post (or multiple posts), but could not find it either.