Is it possible to instantiate a dedicated-server with setting other level on same project build?


Among the servers supported by Unreal Engine, Dedicated Server is one of the Client-Server models, which I am currently researching.

What I’m most curious about is, the Dedicated Server is leveled by the ServerDefaultLevel on the Project-Setting tab.

If Project-Setting sets ServerDefaultLevel in advance and builds DedicatedServer, a DedicatedServer with a set level will be created, the structure that I’m going to implement in the future is there are multiple Dedicated Servers, each server must have a different level.

After designating one Server Manager among the Dedicated Servers, I’m also looking by myself to see if there’s a way for Server Manager to dynamically create or shut down multiple Dedicated Servers, but I haven’t found a way or a process that I’m convinced of yet.

In other words, Server Manager is also a Dedicated Server, The Server Manager is requested by the Client to create and delete Dedicated Servers at different levels,
To manage and understand the users who have accessed it

In my opinion, Dedicated Server can set at least one level, but it needs to set a number of levels. But when I look at the Dedicated Server used in the Unreal Engine, it seems that only one level can be set per project.

If Server Manager creates a new Server (Session), and the clients connect to it, what kind of structure do you choose to create a structure in which the new Server stores the information and then delivers it back to Server Manager when the game is over?

The structure and data I’ve seen are as follows.

A Dedicated Server can load whatever level (map) you want, by specifying it on the command line when starting it up, or when executing game logic (which doesn’t necessarily need a player to trigger it) to load a particular map.

The “set” level per project, simply means “this is the level that’s started by default, if nothing else is provided on the command line.”

Thank you for answering my question, but I want to make sure I really understand.

DefaultServerLevel was understood to be a role that was brought up by the level that was put in DefaultServerLevel by default when no other level was set.

Then, what I want to check further is that you can assign a specific level to the Dedicated Server through the command,

Does this mean that you can add MapLists in the Packaging tab, build with Windows Server Target, and run DedicatedServer with a specific level loaded through CommandLine in the DedicatedServer program?


Moreover, if possible in the above way,
Do I understand that it is possible to run one main-dedicated server in advance, then run the sub-dedicated server as a command at the request of the client, and then exit the sub-dedicated server after the game is over?

For example, to verify that Dedicated Server works well, you can use -log as a command after a shortcut.

Thank you :slight_smile:

Correct. If the map is included in the built maps, you can load it from the command line by just passing it as an argument:

MyGameServer.exe /Game/Maps/MyMapName

(assuming the map lives in Maps/MyMapName in your Content folder)

This can work. You’ll need to run the sub-server on some other port and/or IP address, and you’ll need to somehow communicate to the client to connect to this new port/IP address. This is the “matchmaking/lobby server” versus “game server” model popular with some kinds of games.

Another option is to just load the game map into the running first server, and then when you’re done, re-load the lobby map.
It all depends on how you want to set up your hosting and serving.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.