How do I search for sessions in a LAN?
So, I've been struggling to get a simple multiplayer demo in place for a couple of days now. I'm trying to use Blueprints to create, find and join a session. So far I've done: - 2 levels: first one act as a main menu and handle key presses to allow the user to choose between hosting and joining a session. The second level is an empty one and act as a "gameplay" level. - In my *.Build.cs file I added:
My Blueprint setup for starting/joining session is like this:
What am I missing?
Turns out some machines in our network - mine included - have VirtualBox installed. VirtualBox creates a virtual network driver that was being used to broadcast the search packet (UDP, 255.255.255.255, port 14001) instead of the main network. For some reason, disconnecting my machine from the switch cascade made the problem to go away.
TL;DR version: if you have VirtualBox installed, disable the virtual network adapter before testing your multiplayer game in Unreal.
answered Mar 09 '15 at 03:25 PM
A couple of things that may not be even remotely relevant. But after digging around a bit I found a few things that "might" help.
The default UDP port is 7777 (I presume this is also the case for LAN mode) so make sure the machines can communicate on that port and it's not firewalled. Source: https://answers.unrealengine.com/questions/52877/network-how-to-connect-to-a-remote-listening-serve.html
The machines must be on the same subnet. Source: https://forums.unrealengine.com/showthread.php?52272-Networking-Find-LAN-game-servers
And I seen some comments in the onlinesubsystem source file about running in loopback mode wich has it looking at localhost. Disclaimer: I know only enough about C++ to break things so take that with a grain of salt.
Just thought it might be worth looking at some of these. Best of luck!
Follow this question
Once you sign in you will be able to subscribe for any updates here