P2P "Serverless" with Godot Engine, through Requests

Asked

Viewed 102 times

1

I am developing a game based on Turnos 1v1 na Godot Engine, and I’m having a hard time connecting two players as in a matchmaking. My problem is that I don’t want a central server itself, if possible, I would like a web hosting server to suffice.

The idea I had is to use HTTP Requests to get the IP of the opponent, and that I could do, but I can’t, using Godot’s RPC, start a non-local connection.

It doesn’t have to be the way I described, or the way I’m thinking, basically I want the game to connect two players without the need for a central server that manages the game, only that getting the opponent’s IP is by HTTP requests.

I know little of networks to get a solution to this, but I believe the problem is related to NAT or Firewall, there is some way to implement a P2P connection possessing only the opponent’s External IP?

Another idea that I had, a little more complicated, would be to implement something like a tunneling similar to Hamachi, but to do this automatically instead of manually, connect two players to the same "room", because I have already tested and through Hamachi the connection works, what I would need to know to implement this, if it is the easiest option to achieve the goal?

DRT: I need to establish a connection between only two players on Godot Engine, Basically the initial connection because after, Godot’s RPC already does everything else. The point is that I do not want a central server, I would like, if necessary, only a web hosting server that can do this using only HTTP Requests, at least to make Godot establish the initial connection, ie, intermediate connection between two players.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.