|Topic was automatically imported from the old Question2Answer platform.
I am trying to make a gamepad app using Godot’s built-in High-level Multiplayer. So a computer would run the game and host the server, and then people would download an app on their phone which is a controller made in Godot and is thus a client.
So far the confusing part for me is how you get the IP address and Port that the server will use. (I don’t know anything about this lol). Like, I would want this to be usable by other people in their games, so would they have to go and look up their IP address and port and then enter that in?
Ideally, I would like the server and clients to be able to connect as long as they are on the same wifi. I also would not want them to have to enter anything in, but rather just have Godot figure out which IP and Port belong to the current wifi network and use that.
Is this possible? Again, I have no experience in setting up servers, communicating via TCP/UDP, etc. and I don’t really know what I am doing haha.
IP.get_local_adresses, but this returns tons of IPs. Only one is in the correct format, 192.x.x.x, so can I just say:
var IP_to_use = null
for address in IP.get_local_addresses():
if '192' in address:
IP_to_use = address