I have watched the networking basics video series as well as various other online tutorials, in order to understand multiplayer in UE4. What I am not clear about, is if the built-in multiplayer support, as described in the Networking Basics videos, are limited to LAN, or do they apply to over-the-internet gameplay as well?
I have tried running a simple multiplayer game, that does work when I test it from the editor with 2 players. I run it as host on a server machine and try to connect to it from another machine, not on the same network, but with port 80 (internet) open.
This does not work though. I get no errors, but my game instances clearly do not see each other.
Do I need to go through something like Steam for internet play in UE4? Or am I just doing something wrong? Could you please help me understand what I need in order to be able to play multiplayer UE4 game from client machines to an internet-based server machine?
In editor, you have in options of playing, the fact that client are auto connecting to server. You can disable this option, and test your own way to connect.
From my side, I don't use anything as subsystem, I have a Mainmenu with a connect button, and a textbox with the ip filled by user. Next I wrote a tiny C++ code to connect to server
Next over internet, it seems that UE uses UDP and TCP, so check that your NAT authorizes UDP outgoing on default port (7777).
answered Jan 11 '16 at 09:18 AM
The Unreal Engine server process is listening on port 7777. Try to open this port on your server but don't expect the session discovery to work, it will work only over the same LAN. Just try to connect by IP address to the server. If you use the Steam online subsystem you can leverage a set of services like matchmaking. Make sure to add these lines to your gameengine.ini to enable the default online subsystem:
answered Jan 07 '16 at 05:44 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here