Create the Required Assets #
In this section, we’ll create the following assets that will be used during the Unreal game server tutorial:
- a new level, which will be the default map run by our game server
- a
PragmaGameServer
UObject class, which will contain the basic logic for communicating with the platform
You should already have the TutorialGameModeBase
and MyPlayerController
classes created in the Unreal: Setup tutorial.
Create a default map for the game server
a. Launch your Unreal Editor from the source code build.
b. Navigate to your maps directory and create a new level. Give it a name such that you can easily distinguish it from the level that game clients run. In this guide, we’ll refer to it as ServerMap.
c. (Optional) If you don’t yet have a working game, you can add some interface elements such as text or images to
ServerMap
. This way, it’s obvious when your game clients have successfully connected to the dedicated server.Create a
PragmaGameServer
C++ class:a. Navigate to the location of your C++ classes. Optionally, create a directory to hold the C++ classes specific to your dedicated server.
b. Create a new C++ class with a
Object
parent. We’ll call this classPragmaGameServer
.
In the next section we’ll build out the PragmaGameServer
file with required functionality.