Skip to main content

Play test - Game client integration - (Unreal Engine module)

Last updated on March 12, 2025

Test start matchmaking

  1. Compile the project and open it in the Unreal Editor.

  2. Play the game in the editor.

  3. Once you are in the main menu, navigate to Custom Matchmaking > Start Matchmaking. If your implementation is correct, you should see the Requesting message, indicating that your game is trying to connect to the matchmaking service. Since you haven't started the sample matchmaking backend service, you will receive connection error message on the game client, stating that the backend service is unreachable. You will learn how to run the sample matchmaking backend service on the next tutorial module.

    Start matchmaking

Changing the target matchmaking server

In the previous page, you might notice there's already some logic in the SetupWebSocket function. That code is an implementation for the configurable matchmaking server address. This allow the game to change which server it matchmake to easily.

There are two ways to configure this target address: through DefaultEngine.ini and launch parameters. Launch parameters are the first priority, then DefaulEngine.ini, then the default value, which is ws://127.0.0.1:8080. For testing purpose, if you need to change the value, that is if you run the sample matchmaking backend service in a different computer, we recommend using the Editor method.

Via launch parameters

This is the highest priority that the game will take the address from. Meaning, if this is set, it will ignore other configurations. This can also be done in multiple ways: packaged game, uncooked, or play in editor.

Packaged game

  1. Open your Byte Wars project in the Unreal Engine editor.

  2. Package your project by going to to Platforms > Windows, make sure the Build Configuration is set to Development and the Build Target is set to AccelByteWars (the game client build target), and click Package Project.

  3. Once the package is done, open the folder that you set as the output location previously, and go inside the Windows folder. Open Windows Powershell in that folder.

  4. Run the game by using this command:

    .\AccelByteWars.exe -CustomMatchmakingUrl="ws://target_mm_address:port"

Uncooked

Open Windows Powershell anywhere and run this command:

& "<your_ue5_dir>\UnrealEditor.exe" "<your_project_dir>\AccelByteWars.uproject" -game -CustomMatchmakingUrl="ws://target_mm_address:port

Editor

Open Windows Powershell anywhere and run this command:

& "<your_ue5_dir>\UnrealEditor.exe" "<your_project_dir>\AccelByteWars.uproject" -CustomMatchmakingUrl="ws://target_mm_address:port

Via the DefaultEngine.ini

This configuration is the lower than the launch parameter. This will only be used if the launch parameters for it isn't present. This work for both editor play and packaged game.

  1. Open Config/DefaultEngine.ini file.

  2. Under the [CustomMatchmaking] category, you will find CustomMatchmakingUrl. Edit the value of that variable.

  3. Compile the project and open it in the Unreal Editor. The matchmaking should now point to the new address.