So i am currently trying to make a game using networking. I know how to connect directly to a peer in the network by entering the game hosts IP and the port the game is running on.
I was tinkering with the idea of having a list of all available peers in my LAN. For that i stumbled across this repo https://github.com/Wavesonics/LANServerBroadcast.
This works fine as long as i test on my machine only. What i do
1. export the game as .exe
2. run the .exe
and start the game via the editor
3. in one of the instances host a game
4. in the other instance the game is now listed and discovered
The problem arises as soon as i try to connect two different machines. So what we did: 1. start the game via editor on 2 different machines in the same LAN 2. one machine hosts 3. other machine tries to find the other peer
What happens is that the other machine (not the host) does not discover the game.
I followed the tutorials but cannot seem to get it to work.
Anyone have any ideas what i am doing wrong? Anyone have experience with this solution?
I checked the source code of the repository and the implementation itself looks fine to me. What makes me wonder the most is why would it work on only 1 machine with 2 instances, but not with 2 machines in the same LAN. For me it seems like it only broadcasts/listens on the localhost, but not the LAN. Unfortunately i have no idea what to change about it. Is there a hidden option somewhere in the editor i am missing in order to get godot to broadcast/listen on the LAN?