Documentation for the Unreal C++ Library
Loading...
Searching...
No Matches
Local Game Server Testing

This is a document to explain the process of testing your game server either on your own computer or another server that isn't the PixoVR Multiplayer Platform.

Local server testing is similar to testing against a PixoVR Multiplayer Platform hosted game server. The two differences are that we need to simulate the matchmaking process and create a server build to run against that is for the platform your going to run that test game server on.

You will also want to follow these steps in the following order.

  1. Matchmaking Simulator
  2. Agones Sidecar
  3. Unreal Engine Game Server
  4. Unreal Engine Game Client

Matchmaking Simulator

With local testing, we simply simulate the matchmaking process with an intermediate application. You can find the repository for it here. You will need to be able to run a Golang program. The installer can be found here.

Once you've cloned the repository and installed Golang, you need to configure the yaml file, found in <multiplayer-gameservers-repo-location>\local-matchmake\ Below is an example of what your configuration yaml will look like, along with comments on what the values are used for.

serverPort: 8080 \\ The matchmaking server port
gameserverPort: 7777 \\ The unreal game servers port. The default is 7777.
gameserverIp: 127.0.0.1 \\ The unreal game server ip.
mapName: FRO_HUBMaster \\ The game servers default map.
sessionName: Test \\ The game servers session name. This can be whatever you'd like.
sessionId: FB079FBF281240999A7C38A7A3AB4D76 \\ The game servers session id. It needs to follow this similar format.
owningUserName: PVROServer \\ The game servers session "owning username". You can change it to whatever you'd like.
moduleVersion: 2.01.15 \\ The game servers module version.
moduleId: 17 \\ The game servers module id.
orgId: 20 \\ The game servers organization id.

Now all of these values are neccessary, and do have default values set within the program. After you've setup the config.yaml, you only need to run the program with the following command from the location of the yaml file.

go run main.go

Agones Sidecar

Before you run your gameserver, you will need have an instance of the Agones Sidecar running. You can find the sidecar compatible with the version of Agones (v1.32.0) we use here.

After you've downloaded the file and extract the sidecar files, you will only need to run the sidecar program. For Windows, you will want to run the following command.

./sdk-server.windows.amd64.exe --local

For how to run the local sidecar on other operating systems, or other questions about local testing, please refer to the Agones local testing documentation.

The Game Server

The game server does not need any changes to any configurations, but you will need to create a build for the operating system of the machine the server will be running on. Running the game through the editor as a server will not work.

It's also suggested that you run the game server after your Agones Sidecar to ensure the Unreal Engine Agones component can connect to the Agones sidecar.

The Game Client

Now that you're mocking the matchmaking end point, you only need to change the ServerURI found in DefaultGame.ini to point to where ever your local matchmaking program is running. Below is an example for if you're running that local matchmaking program on your personal computer.

[PixoVRMultiplayer]
ServerURI="wss://127.0.0.1/matchmake"