Unreal Tournament Integration

Building the Unreal Tournament sample using the Genvid SDK has 2 main steps. First you set up and build the base Unreal Tournament project, then you modify it to use the Genvid SDK.

Before You Begin

If you don’t have the Unreal Tournament source code, you’ll need to download it from the Unreal Tournament GitHub repository.

Important

You need to connect your Epic Games and GitHub accounts in order to access the repository. If you haven’t connected your accounts, instructions are on the Unreal Engine website.

Important

Make sure you review the Required Third-Party Software section while you’re on the Unreal Tournament GitHub page.

Note that the initial download, build, and first run of the game may take some time.

Set Up Unreal Tournament

To build and run the Genvid SDK Unreal Tournament sample, you first need a working build of the original Unreal Tournament project.

You’ll need to sync to a specific changelist to ensure you have the correct version of the Unreal Engine for our sample. You’ll also need to add in a missing header for the game to compile correctly.

  1. Run the following Git command to sync to the required changelist.

    git checkout 27e91ad5b439cfe698b2d1345432983ccfbc0936
    
  2. In Engine/Source/Programs/UnrealWatchdog/Private/UnrealWatchdog.cpp, add the following line immediately after the last include directive:

    #include "EngineBuildSettings.h"
    
  3. Follow the remaining instructions for setting up the Unreal Tournament project on the main page of the repository.

  4. Verify you have a working Unreal Tournament build before proceeding.

Add the Genvid SDK to Unreal Tournament

The Genvid SDK includes script and configuration files in the samples/ue4/ut4 folder which automate much of the integration process. You need to add the Unreal Tournament installation to your environment variables and modify the UT code to make the GenvidPlugin interfaces available.

  1. Set UTROOT to your Unreal Tournament directory.

    How you set UTROOT depends on the shell you use. For example, on Windows you use the following command:

    set UTROOT=C:\UnrealTournament
    
  2. Run the ut4.py script to add necessary files and make required modifications to existing files.

    py ut4.py prepare
    

    For reference, this script will:

    • Copy GenvidPlugin to UnrealTournament/Plugins/.
    • Copy the Genvid module to UnrealTournament/Source/.
    • Copy GenvidConnector.h to UnrealTournament/Source/UnrealTournament/Public/.
    • Copy GenvidConnector.cpp to UnrealTournament/Source/UnrealTournament/Private/.
    • Copy GenvidGameStateBase.h to UnrealTournament/Source/UnrealTournament/Public/.
    • Copy GenvidGameStateBase.cpp to UnrealTournament/Source/UnrealTournament/Private/.
    • Copy Content to UnrealTournament/.
    • Copy DefaultEngine.ini to UnrealTournament/Config.
  3. Open \Source\UnrealTournament\UnrealTournamentBuild.cs.

  4. At the end of the public UnrealTournament(TargetInfo Target) routine, add the following lines:

            PrivateIncludePaths.Add("Genvid/Private");
            PublicIncludePaths.Add("Genvid/Public");
            PublicDependencyModuleNames.Add("Genvid");
    
  5. Build Unreal Tournament.

    py ut4.py build