Create Server Level and Game Mode Base #

Goal:

  • Create an Unreal level (GameServerLevel) that will be the default map run by our game server
  • Set the server’s default map to our GameServerLevel

Step 1: Create the default map for the game server

  1. In the Unreal Editor, create a new level called GameServerLevel.
  2. In the GameServerLevel World Settings, set the Game Mode Override to MyGameModeBaseBP.
  3. (Optional) If you don’t yet have a working game, you can add some interface elements such as text or images to the server level. This way, it’s obvious when your game clients have successfully connected to the dedicated server.

Step 2: Set the default server map

In the Unreal Editor, select Edit -> Project Setting from the main menu. In the Maps & Modes section, set the Server Default Map value to GameServerLevel. This tells Unreal to load the GameServerLevel when a server is spun up. As soon as the GameServerLevel is started, its game mode base BeginPlay() method is called.