Step 1: Setup Unreal Engine project

We'll use the third-person template from Unreal Engine. All the components come with networking out of the box. These steps also apply to any other Unreal Engine games.


Authenticate with GitHub Container Registry

We need to authenticate with the GitHub Container Registry (GHCR) to be able to pull the Unreal Engine Docker image.

  1. Make sure you already have Unreal Engine GitHub Access here.
  2. Authenticate with these instructions.

Create project from template (or bring your own project)

  1. Create a third-person template with the C++ version. We'll create a guide for using Blueprints instead of C++ soon.
  2. Set Quality Preset, Starter Content, and Raytracing to anything.
  3. Click Create. Third person create dialog
  4. Open the Visual Studio project by clicking Tools > Open Visual Studio. Open visual studio

Add server target

We need to add a target so you can compile your game as a dedicated server to run on Rivet.

Create a file at Source/MyProjectServer.Target.cs with the following. Replace MyProject with your project's name.

using UnrealBuildTool;
using System.Collections.Generic;

public class MyProjectServerTarget : TargetRules
{
	public MyProjectServerTarget(TargetInfo Target) : base(Target)
	{
		Type = TargetType.Server;
		DefaultBuildSettings = BuildSettingsVersion.V2;
		IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_1;
		ExtraModuleNames.Add("MyProject");
	}
}
Source/MyProjectServer.Target.cs