So, I’ve compiled dedicated server as GameServer.exe, I’m not satisfied that to make this I need first to get source code from github and compile it, and only in this case I can compile dedicated server.
But the question is: how to connect compiled clients to this server?
I tried to connect to it with GameClient.exe 127.0.0.1 -game
But this doesn’t work. My server starts successfully and is shown in processes.
Hi iShadowfax,
We have assigned someone to your post and they will assist you as quickly as possible. Please remember that bumping is reserved for questions that have not had a response after several days, please refrain from bumping, especially in rapid succession. This pertains to the forums as well. If you feel this may be related to a bug, please move it to the bug reports section where it may receive additional attention.
Hi iShadowfax,
We need some more information to diagnose this issue. Can you connect to a listen server instance of your game? Also try running the dedicated server in a command prompt window with the following command:
UE4Editor-Cmd Game -server -log
Where Game is the name of your project. This will print log information to the console window and may reveal any problems that are occurring. UE4Editor-Cmd.exe should be in the Engine/Binaries/Win64 directory after you compile for the editor configuration.
If there are any errors in the log, feel free to post a snippet here and we’ll go from there.
Server runs succesfully, i can connect to it using “development client” build but not with a shipping client build.
MyProject-Win32-Shipping.exe 127.0.0.1 this launches the game but no connection in a server log console
What configuration was your server executable built with? Debug/Development/Shipping, Win32/Win64? There may be a bug where clients can only connect to servers of the same configuration. What version of the engine are you using?
UE4: 4.2.1 from git hub with all patches (compiled with Development Editor Win 64)
Server: Shipping server Win32
Client: Shipping client Win32
I have been unable to reproduce this issue here, it’s still under investigation. I’ll get back to you when I have more information.
It is not resolved You can’t simply connect to a compiled dedicated server with shipping build type
After investigating this further, it turns out that the engine explicitly ignores map or host names on the command line in shipping builds (see the UGameEngine::Init()
function prior to 4.4, and the UGameInstance::StartGameInstance()
function in 4.4).
To work around this you can provide a way to connect to a server in your in-game GUI, you can continue to test with non-shipping builds, or you can remove the code in that overrides the command line in your custom engine build. In the functions I mentioned above, look for
#if UE_BUILD_SHIPPING
// In shipping don't allow an override
Tmp = TEXT("");
#endif // UE_BUILD_SHIPPING
and comment it out or delete it. (In 4.2.1 this should be in GameEngine.cpp around line 468).
Strange approach. I need this to start many instances of game server for a session like game.
No information about productive builds at all especially about dedicated server.
Why can’t we build it without using ue4 source code from github?
When the issue with command line will be fixed? and many other questions. Dedicated server is a mystery.
Enabling a dedicated server from the installed version of the engine (not GitHub) is something we definitely want to fix in a future release.
The command-line processing in Shipping builds is by design, so it’s unlikely to change in a future release.
So what’s the status? Any plans for this?
We are looking into distributing the dedicated server binaries, but we don’t have a specific timeline to share at the moment. They were originally omitted from the distribution to reduce the download size of the engine.
Same problem here. I have built and can run a headless dedicated server, but a Shipping client has no way to connect.
This is now in GameInstance.cpp around line 300