Skip to main content

Installation

Architecture

NetCluster is the core framework for object and actor replication and migration in Unreal Engine. To enhance its capabilities, two key addons are available:

  • ClusterServer: Implement the required interface for NetCluster. It can be directly used/or as an example.
  • ClusterServerExtra: Offers a basic implementation for server communication and management.

You can also create additional addons to extend NetCluster’s functionality for tasks like authoritative movement, latency compensation, operational APIs, and automatic load balancing.

Required Repositories:

Building Unreal Engine

Start by building the modified Unreal Engine and use it as the foundation for your project.

Follow the official compile Unreal Engine instruction to build the engine.

tip

For best result, use Clang to compile the engine.

Adding the NetCluster Plugin

  • Clone NetClusterPlugin and place it in [ProjectFolder]/Plugins/NetCluster.
  • Modify Project.uproject to use the NetCluster Plugin only for Server or Editor builds.
	"Plugins": [
...
​{
"Name": "NetCluster",
"Enabled": true,
"PlatformAllowList": [
"Win64",
"Linux"
],
"TargetAllowList": [
"Server",
"Editor"
]
},
...
]
  • Install plugin binaries for Unreal Engine. Run the following command in your command prompt or terminal:

    [YourProjectFolder]/Plugins/NetCluster/InstallPlugin.bat [Your engine version]

    Engine version should only contains Major and Minor version number, like 5.4, check Unreal Vision for more detail.

  • Configure gameplay tags provided by the NetCluster Plugin:

Add directly to DefaultGameplayTags.ini:

[/Script/GameplayTags.GameplayTagsSettings]
...
+GameplayTagTableList=/NetCluster/DT_NetClusterTags.DT_NetClusterTags
...

Configuring the NetDriver

The UClusterServerNetDriver implements the necessary interfaces required by NetCluster. It also serves as a reference for creating custom NetDrivers for client players.

To use this NetDriver, add the following to the relevant configuration file:

[/Script/Engine.Engine]
!NetDriverDefinitions=ClearArray
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="/Script/YourProjectModule.ClusterServerNetDriver",DriverClassNameFallback="/Script/OnlineSubsystemUtils.IpNetDriver")

Configure ClusterServerNetDriver:

[/Script/YourProjectModule.ClusterServerNetDriver]
AllowPeerConnections=False
AllowPeerVoice=False
ConnectionTimeout=60.0
InitialConnectTimeout=60.0
RecentlyDisconnectedTrackingTime=120
TimeoutMultiplierForUnoptimizedBuilds=1
KeepAliveTime=0.2
MaxClientRate=100000
MaxInternetClientRate=100000
RelevantTimeout=5.0
SpawnPrioritySeconds=1.0
ServerTravelPause=4.0
NetServerMaxTickRate=30
MaxNetTickRate=120
MaxPortCountToTry=512
MaxPortCountToTry=512
ResolutionConnectionTimeout=20.0
ReplicationDriverClassName="/Script/ReplicationGraph.BasicReplicationGraph"

Configuring NetCluster

Account information is need to when create server instances, you can configure NetCluster in game configuration files or using a separate JSON configuration file.

Add the following to the appropriate engine/game configuration file:

[/Script/NetCluster.NetClusterSettings]
AccountID=YOUR_ACCOUNT_ID
SignatureSeed=YOUR_PASSWORD_BASE64
LicenseServerHostName=license.netcluster.clustech.com.au
LicenseServerListenPort=32734
LicenseServerCurvePubKey=NTFEQFotTyNyfXhmYkAhP0J4dHVVaTA/PyFRPTdTW2VPdnJVZVFuRw==
MasterNetConnectionClassName=/Script/NetClusterStarter.ClusterServerNetConnection

Now your project is ready for clustering, and you can configure the server structure and manage inter-server actors.