Unreal Tournament Integration

Building the Unreal Tournament sample using the Genvid MILE SDK has 2 main steps. First you set up and build the base Unreal Tournament project, then you modify it to use the Genvid MILE 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.

Obtaining the Unreal Tournament Project

To build and run the Genvid MILE 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. Inside your cloned repo folder, run the Setup.bat file. This will download the necessary binaries not stored in GitHub repo.

  4. Run UE4PrereqSetup_x64.exe from Engine/Extras/Redist/en-us to complete the initial setup.

Set Up Unreal Tournament

The following steps are to help guide you in setting up the Unreal Tournament project.

See the README.md file in the Unreal Tournament Git repository for the latest updates on the project.

Important

Ensure you are using Visual Studio 2015 Update 3 before you continue.

  1. Open UnrealSwarm.sln located in Engine\Source\Programs\UnrealSwarm.

  2. Select Development mode in the Solution Configuration drop down menu.

  3. Right-click the Agent project and select Properties.

  4. Go to the Signing tab and clear Sign the ClickOnce manifests check box.

  5. Right-click the Agent again and select Build. You can close everything when done.

  6. Run the GenerateProjectFiles.bat in the repo folder. This will generate UE4.sln.

  7. Open UE4.sln in Visual Studio.

  8. Set the Solution Configuration to Development Editor.

  9. In the right panel menu, find ShaderCompileWorker and UnrealLightmass projects and build them.

  10. When the previous step has completed, right-click the Solution and build it. Once completed, UE4Editor.exe will be available in Engine\Binaries\Win64.

  11. Got to File > Open Level.

  12. Select “DM-Underland” from the Assets.

  13. Select Play.

Add the Genvid MILE SDK to Unreal Tournament

The Genvid MILE SDK includes script and configuration files in the samples/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 UnrealTournamentSourceUnrealTournamentUnrealTournamentBuild.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. Open UnrealTournamentPluginsCorsairRGBCorsairRGB.uplugin.

  6. Set the value EnabledByDefault to false and save.

  7. You need to rebuild the Solution again after making these modifications.

  8. Build Unreal Tournament.

    py ut4.py build