0 votes

I want to use ngrok to test my multiplayer game made in godot with my friends and for awhile i didnt get any results and everytime i connected to the ngrok server create_client() would just return 0, with no sign of a connection. Then i found out that ngrok only uses tcp and not udp. Im asking so i can get to the bottom of why i cant establish a communicable connection using ngrok.

Godot version v3.2.stable.official
in Engine by (439 points)

1 Answer

0 votes
Best answer

The high-level multiplayer API uses UDP exclusively. No TCP is used.

To expose your server to the public Internet, you need to either:

  • Forward the server port to your PC's internal IP on your router.
  • Use Godot's UPnP class to forward the port automatically (but keep in mind it's not supported on all routers).
  • Set up a VPN with your friend.

I clarified this in the documentation: https://github.com/godotengine/godot/pull/45171

by (10,271 points)
selected by
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.