0 votes

Hi,

I'm making a networked 1v1 game that is meant to use a peer to peer connection between two clients.

I know that there are several host/client examples, but I'm looking to establish a connection without having to open any ports from a firewall.

I've looked at doing a NAT punchthrough, and I can use a master server to inform each of the clients of the others public ip.

Which class would allow me initialize this kind of UDP connection with godot? I looked at PacketPeerUDP, but that seems to only work with a client/host style approach.

Godot version 3.2.3
in Engine by (12 points)

1 Answer

0 votes

Godot doesn't support UDP NAT punchthrough yet, although you can use UPnP. Only WebSockets NAT punchthrough using a STUN or TURN server) can be used.

UPnP won't work everywhere as many routers have it disabled by default for security reasons.

by (9,376 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.