The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates. | Twitter

0 votes

I am making a multiplayer game with the High Level Multiplayer API. The game works fine when connecting over a local IP address, but it doesn't connect over a public IP.

The following is my code for creating a server and joining a server:

func create_server(player_nickname): = 1 = player_nickname
    players[1] = self_data
    var peer =
    peer.create_server(DEFAULT_PORT, MAX_PLAYERS)

func connect_to_server(player_nickname, server_ip): = player_nickname
    var peer =
    if server_ip == "":
        peer.create_client(DEFAULT_IP, DEFAULT_PORT)
        peer.create_client(server_ip, DEFAULT_PORT)

The connect to server function is called by a button in a Menu that takes the ip and gives it to the function. It all works over local IP but doesn't over external IP. I have also enabled port forwarding towards my server.

in Engine by (14 points)

It's eerie that you asked this question 30ish minutes ago. I just posted an almost identical question here: Also having trouble establishing a connection via an external IP address, even with port forwarding set up.

Hopefully we can both get this resolved.

o sheet that is kinda creepy.

Please log in or register to answer this question.

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 Frequently asked questions and 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 [email protected] with your username.