I'm creating a multiplayer game that uses a pc as a host, and any other device as a peer, meaning mobile phones and laptops.
It's usually working fine, but I had a friend come over try to access the game using their mobile on mobile data. It seemed to connect and join the room, but couldn't receive any messages from the host.
I then suggested she use her laptop, and again she failed. I asked her what wifi she was connected to, and it turned out that she was connected to my routers guest account.
It was I'd because it's worked fine for other people. I then connected her Wi-Fi to my main account and she was suddenly able to connect.
I then logged out of my game and turned off my phones Wi-Fi and tried to connect using my mobile data, and that didn't work either.
Anyone had that issue before? It only seems to happen with data and guest wifi. Yet works with normal wifi, both 2.5ghz and 5ghz.
NAT issues see TURN servers as a workaround
So... Nobody? :)
As I said, it's only when trying to sign in using a guest wifi account or mobile data.
I should point out that I have 2 separate programs working together, both made in C2. The first acts as the main host and has the main game and content. The apps I'm having problems with are web based controllers, similar to how Jack Box games work. As soon as I connect the devices to wifi, it works.
Might there be security features blocking things that I'm unaware of?
*edit oh sorry, didn't see your message. Turn servers?
Develop games in your browser. Powerful, performant & highly capable.
Yeah, this is standard network address translation (NAT) stuff. I think the multiplayer concepts tutorial covers it. TURN servers help work around it by relaying bandwidth, but you have to run the server yourself.