Cross-platform multiplayer

I’ve built my game on windows, mac and linux. It looks like Mac and windows are playing multiplayer games together nicely, but my linux build is not.

I can see the LAN games fine, but fails to connect.It looks to be an issue with ENetworkFailure::OutdatedClient.

I am wondering why linux fails when its all built with the same game code and data, unless it is because I build ue4 from source on linux while on windows and mac I just use the precompiled engine?

How does ue4 determine if a client is outdated?

Hey supagu-

Are you trying to connect the Linux game to another Linux game or are you trying to connect the Linux game to either the Windows or Mac game? Are you able to reproduce this issue in a new project? If so can you list the steps that lead to this issue or provide a sample project where this issue is occurring?

Cheers

windows-to-windows works fine
windows-to-mac works fine
linux-to-linux works fine
linux-to-any other platform fails giving me the error ENetworkFailure::OutdatedClient.

I went and tried the MultiplayerShootout demo (Engine Feature Examples for Unreal Engine | Unreal Engine 5.1 Documentation)

and it looks to have the same problem.

Now I have a possible hunch, on windows and mac I used the precompiled version of the engine while on linux I have to compile the engine. I went and changed an engine header file on linux that required some rebuilding so wonder if this could be the problem.

I also changed this header file on windows and mac, but they didnt need an engine build. The change I made is in
Epic Games\4.11\Engine\Source\Runtime\PakFile\Public\IPlatformFilePak.h
on line 758 I added:
“public:”

Hey supagu-

Can you send me a copy of your project or another sample project that has this issue occurring? So far I’ve had no luck in reproducing this issue and want to make sure my setup matches / see exactly what the problem is.

I have a hunch it might be due to the engine version reporting problem.

I have in windows 10 ue4 11 preview 4 running, ue4 editor reports the version as:
Version: 4.11.0-2843242+++UE4+Release-4.11

On my linux machine (ubuntu 15.10) I have built from ue4 source (using the 4.11 preview 4 tag in github) ue4 editor reports version as:
Version 4.11.0-0+UE4

Do you think this will be a likely cause for the problem ?

I don’t believe that this would be caused by differences in engine version. Can you test that a new project in 4.11 on Windows does/does not work if used on Linux? Also, you mentioned that you built the project for Windows, Mac, and Linux however what platform was the project developed on? Does the same cross-platform issue occur in a new project? If so can you walk through your setup steps to help me put together a sample project or send a copy of your project or sample project for me to test directly?

I’ve uploaded the sample project that doesn’t work for me here:
https://drive.google.com/open?id=0B_nQZvJoqbFmM1ZqRVlQT3hjTFU

This is simply the multiplayer shootout sample and its not working for me.
I initially setup this project on windows, and just copied it over to my linux computer.

If this doesn’t have the same problem for you I’ll try to send through my actual project (can you give me your email address to send you the URL to download if this is the case, thanks).

All also put in my procedure for getting a linux build working (incase there is something wrong in that process):

  1. Download the source from https://github.com/EpicGames/UnrealEngine using the appropriate tag (4.11 preview X)
  2. Extract the zip and run Setup.sh
  3. Run GenerateProject.sh
  4. Run the console command:
    make SlateViewer CrashReportClient UnrealPak UnrealLightmass ShaderCompileWorker UE4Editor

Hello supagu-

Sorry for not responding sooner. I have copied the project onto both the Windows machine and the Linux machine - how are you connecting the two projects together? Are you doing so through console commands / IP address or something else?

I use the launch_editor.py to launch the game on both machines, which just loads up the project using the ue4 editor with -game.
This should launch you straight into the menu of the game where you can host and join a game.

I have tried an internet game, which I can’t see the host machine in the server list.
Then I tried a LAN game and it shows up but fails when attempting to join.

After speaking with one of our Linux developers it sounds like your initial thought of building source on Linux vs using binary on Windows/Mac may be the issue. When building the source version the engine net version is 0 whereas the binary build sets a specific changelist by UAT. Can you try the following options and let me know if either helps.

  1. Build all three binaries locally

or (easier, but will cause full rebuild of their Linux build)

  1. Edit Engine/Source/Runtime/Launch/Resources/Version.h and set BUILT_FROM_CHANGELIST to the same value as the CL in the binary build (which can easily be found in Help->About Unreal Editor)

Thanks , I’m going to wait till 4.11 is fully out and give this ago as that should be out soon enough.

Hey supagu-

I’m going to mark this as resolved for tracking purposes. If you are still having issues after updating to 4.11 feel free to comment here again to reopen the post and we will continue to investigate.

I can now confirm building all platforms from source has resolved this issue