Packaging and creating a dedicated server
I'm currently working on a game where several players are supposed to be able to connect to a server and then play with each others. I got everything to work while i was using the dedicated server available to launch within the editor, but as soon as i tried create a server otherwise it failed.
I've red about packaging and getting a server exe with it, but can anyone help me how to do this?
A more official answer that I hope will help out in the interim.
ShootergameServer.build.cs should be in GitHub as of the 4.1 release.
The distributed binaries for the editor that come from the launcher do not include compilation against a preprocessor define UE_SERVER which gives you the optimizations and some additional parts required to run in the server executable mode. I'm not sure at the moment what the plan is, but I would assume that this isn't supported in this fashion for the time being. There was a bug filed to make this more clear that will be in the next release (not 4.1 because that is imminent).
That being said, you have all the code to compile the full engine source in GitHub and can GenerateProjectFiles.bat to make the UE4.sln file that will have your project and all our modules included. If you compile this in as "Debug Server", "Release Server", etc you will get the server executable (MyGameServer.exe) to compile properly. In this mode you will need to cook your content via UFE so that it has data to run with.
As always, the editor can run in -game and -server modes for emulation of MyGame.exe and MyServer.exe respectively.
I hope this helps and will dig further if necessary.
answered Apr 24 '14 at 01:04 AM
Could you please make a short video tutorial on this? I'm really confused cause I don't have lot's of experience in compiling from source code... In was expected not to work with engine source code but only with a distributed release...
answered Jul 14 '14 at 08:35 PM
I wrote a blog post detailing the steps I took to build, run, and connect to a dedicated server. I hope this helps!
answered Sep 06 '14 at 05:44 PM
If you're referencing the ShooterGame demo (possibly others), I've found through talking with the Epic staff that there is a target file missing (possibly in other projects as well) from the GitHub that enables the building of the dedicated server .exe files.
ShooterGameServer.Target.cs: // Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
Hope that helps somebody..
answered Apr 15 '14 at 10:46 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here