[UE4-26] How to efficiently create a dedicated server project

I have a multi-player game prototype built using the ‘normal’ UE4 engine which can obviously only run as a listen server. I now want to port this project across to a dedicated server project and continue developing the game. I hope that several instances of this dedicated server will run on the server machine simultaneously, with clients able to intelligently connect to the correct one.

Packaging a dedicated server build takes significant time before I can port changes to the clients, whereas re-building the prototype project is fairly quick and still results in an executable that I can distribute/share across the network. I really can’t afford to lose upwards of an hour each time I need to make small changes (this is a prototype after all), so is it possible to ‘complete’ the prototype project, including doing all my testing on that build, and only then ‘convert’ it into a dedicated server project and build/package it before the final distribution? If so, how does one go about it?

You can add command args “-server Port=8000” to launch project:
In our project, we use command to launch dedicate server in Windows

E:\UnrealEngine\Engine\Binaries\Win64\UE4Editor.exe path_to_our_project_dir\xxx.uproject /Game/Maps/SomeMapsName Port=8000 -server

The specified port value maybe not real used.
In single System, you can run mutil instance of dedicate server;
The specified port value is a start value, if 8000 not valid, it will try to use 8001, and so on.

1 Like

Thanks for that info. Will definitely need to use multiple ports/sessions to connect the game clients.

However, that’s not really the problem I have right now. I’m really worried about changing to a dedicated server project now, when the game is far from finished, and having these long compile and package times for even minor changes. I really need to know whether I should finish developing the game on the current build (created through the Unreal Launcher engine) knowing that I can load the project into a github repository source build of the engine at a later stage to create the dedicated server build, or whether I’m stuck with starting the project as a dedicated server and just having to deal with these long build times.

Yes, use Unreal release engine to developing your game is ok.
And your need a source build engine to build DS.
Build time is not a problem,it need a long time only first build. both engine and your project.
so, the minor changes don’t cost a long time to build and package a DS.

1 Like