• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

UDP broadcast works only on few specific LANs?

M

munkbusiness

Guest
OK so this question might not be actually be about what Game Maker does, but about networking, but I will ask anyways just in case someone here knows what is going on.

So I am developing a local multiplayer game that is played on phones for a study project. One phone broadcasts out a challenge using UDP broadcast and another responds and the game starts.

Now this is tested and works for me, but not on all networks.

These are my networks cases:
- At home on personal network: Game works
- Using 4G on each phone: Game doesn't work (expected)
- On university (eduroam) network: Doesn't work (expected)
- On 4G but one phone makes a shared connection that the others connect to: Game works
- My PC makes a shared connection that my phones all connect to: Game doesn't work (WHAT!?!?)

The last is the one I have trouble understanding, and it also destroys my workflow. As I often work on university and with multiple phones it is easiest for me to use webserver to send an update out to all phones using my PC as network host, but for some reason UDP broadcast cannot find the other phones on this setup. And having to disconnect multiple phones from one network to another between each test section hampers my flow.

I am on Windows 10 and use netsh wlan hostednetwork, to create my shared connection. The phones get internet my ethernet just fine this way.
 

bml

Member
Is the Windows 10 firewall blocking the packets?

Is the broadcast address correct?

Are you sure all the devices are on the same network?

Is the network that the PC lives on enforcing some policy that is blocking UDP? I'm not really understanding the network topology for the PC and mobile devices. Many network admins don't like random broadcast traffic on their networks.

In any event, I'd look at the first two then install Wireshark and start looking at packets.
 
Last edited:
M

munkbusiness

Guest
Is the Windows 10 firewall blocking the packets?
- Might be, I have tried with disabled firewall, but IDK if it could still block its own connection. (I have also disabled my anti virus shields (Avast))

Is the broadcast address correct?
- It is a broadcast there is no address, it broadcasts to everything on the local subnet. The port is correct. As I mentioned it works on other networks.

Are you sure all the devices are on the same network?
- yes double checked even triple checked. I even remove other networks jsut so it doesn't randomly jump without me knowing it.

Is the network that the PC lives on enforcing some policy that is blocking UDP? I'm not really understanding the network topology for the PC and mobile devices. Many network admins don't like random broadcast traffic on their networks.
- I am hosting my own network. My computer is the host, so there should be no external admin blocking it.

In any event, I'd look at the first two then install Wireshark and start looking at packets.
- I have installed wireshark now, I can see the messages are being sent and the content of them are correct. I do not know how to look for blocks. It is lightblue IDK if that means anything.
 
Top