Hi guys, i’m writing here, hoping that someone can help me with this problem:
I am using Unreal Engine 4.6. I have created a simple multiplayer test project (in Blueprints, blank project; no C++ code) using GameInstance and the functions: CreateSession, FindSessions, JoinSession. I have built a development binary package on Windows 7.
In the game, there is a simple initial “screen” (game level/map) with a “Host” button, “Join” button and an IP text input. Once a game is created / joined, the game switches to another map (using ExecuteConsoleCommand - “ServerTravel GameMap”) where you can move a 3rd person template character around.
Here is the scenario that gives me a hard time:
I start 2 instances of the game. In one instance I select “Host” (calling CreateSession on GameInstance). On the other instance I enter the IP address of the machine where I started the first instance and then select “Join” (calling FindSessions on GameInstance; getting the first result if any and calling JoinSession on that result).
If I start both of these game instances on the same machine, then everything works fine. FindSessions returns a result. JoinSession works. Both client and server change to GameMap and the 2 “blue guys” (controlled by me, one at a time, from their respective game windows) can see each other running around.
If I start one instance on a machine, and the other on a different machine, running in the same local network (behind a router), then FindSessions does not return any results. Also if I connect the 2 machines directly to each other using a UTP cable, same problem: FindSessions does not return any result.
I have edited the appropriate ini file and set the OnlineSubsytem to OnlineSubsystemNull (aka using LAN). Also I have checked the “LAN” checkbox on the CreateSession, FindSessions blueprint nodes.
I start the executable using “- log” and when I click on host, it says that the ipNetDriver is listening on port 7777 (I assume UDP). What I don’t know is if it listens on all network interfaces (0.0.0.0) or just the first one it finds (I will try and check that myself in the meantime using netstat)
I don’t know how to proceed from here (to make the multiplayer work on 2 different machines in LAN)
Any help is greatly appreciated. If you need more information, I can provide it (such as screenshots of the blueprints, ini files or whatever else you need)
Thank you