Skip to content

The Amazon GameLift Plugin for Unreal contains libraries and native UI that makes it easier to access GameLift resources and integrate GameLift into your Unreal game. You can use the GameLift Unreal Plugin to access GameLift APIs and deploy AWS CloudFormation templates for common gaming scenarios.

License

aws/amazon-gamelift-plugin-unreal

Amazon GameLift Plugin for Unreal Engine

GitHub GitHub release (latest by date) GitHub all releases GitHub release (latest by date)

Compatible with Unreal Engine 5 (versions 5.0, 5.1, 5.2 and 5.3).

Overview

Amazon GameLift is a fully managed service that allows game developers to manage and scale dedicated game servers for session-based multiplayer games. The Amazon GameLift plugin for Unreal Engine provides tools that makes setting up your Unreal project, compatible with UE 5.0, 5.1, 5.2 and 5.3, for hosting on Amazon GameLift quicker and easier. Once installed, you will be able to search the plugin from within the Unreal Engine editor and start using it to integrate Amazon GameLift functionality into your client and server code. The plugin contains functionality to automatically bootstrap your game runtime environment to the AWS Cloud, fully test your game server integration with Amazon GameLift locally, and deploy your game servers on Amazon GameLift.

You can use the following built-in templates to deploy your game for some of the common scenarios.

  • Single-region fleet: Deploy your game server to one fleet in a single AWS Region. Use this scenario to experiment with your install scripts and runtime deployment, as well as your integration.
  • FlexMatch fleet: Deploy your game server for hosting with a FlexMatch matchmaking solution. Amazon GameLift's FlexMatch is a highly scalable and customizable matchmaking service for multiplayer games. Use this scenario to set up basic matchmaking components (including a rule set) that you can customize.

Each scenario uses an AWS CloudFormation template to deploy your game, creating a stack with the necessary resources. You can view and manage your resource stacks in the AWS Management Console for CloudFormation.

Prerequisites

  • Amazon GameLift plugin for Unreal download package. Download a zip file from the GitHub Releases page. Or clone the plugin from the Github repo.
  • If you cloned the repo you will also need to download the following items from Amazon GameLift's Getting Started. Otherwise, if you downloaded the zip file from the GitHub Releases page, you can skip this step.
    • C++ Server SDK Plugin for Unreal
    • C++ Server SDK
  • If you cloned the repo instead of downloading the zip from the GitHub Releases page, copy the source code for C++ Server SDK Plugin for Unreal into the folder amazon-gamelift-plugin-unreal-release-<version>/amazon-gamelift-plugin-unreal/GameLiftPlugin/Source/GameLiftServer/. The REPLACEME.md inside the directory details what the file structure should look like. Delete the GameLiftServerSDK.uplugin from the same directory. Then make the following code change to amazon-gamelift-plugin-unreal/GameLiftPlugin/Source/GameLiftServer/Source/GameLiftServerSDK/Private/GameLiftServerSDK.cpp. Change line 30 and 31 from
FString BaseDir = IPluginManager::Get().FindPlugin("GameLiftServerSDK")->GetBaseDir();
const FString SDKDir = FPaths::Combine(*BaseDir, TEXT("ThirdParty"), TEXT("GameLiftServerSDK"));

        to

FString BaseDir = IPluginManager::Get().FindPlugin("GameLiftPlugin")->GetBaseDir();
const FString SDKDir = FPaths::Combine(*BaseDir, TEXT("Source"), TEXT("GameLiftServer"), TEXT("ThirdParty"), TEXT("GameLiftServerSDK"));

        If you downloaded the zip file from the GitHub Releases page, you can skip this step.

  • Microsoft Visual Studio 2019 or newer.
  • A source-built version of the Unreal Engine editor. Required to develop server build components for a multiplayer game. See the Unreal Engine documentation:
  • (Optional) A C++ multiplayer game project with game code. Projects that use Blueprints only are not compatible with this plugin, at this time.
  • An AWS account with access permissions to use AWS GameLift. See Set up programmatic access with long-term credentials.

Install the plugin

Complete the following steps to install and enable the plugin for your multiplayer game project. For more details, see the AWS GameLift documentation.

  1. Build the Amazon GameLift C++ Server SDK. See section below for details.

  2. Install and enable the plugin.

    1. In your game project root folder, create a folder called "Plugins" and copy the "GameLiftPlugin" folder located inside the downloaded Amazon GameLift plugin into this new folder.

    2. In the .uproject file, add the following to the Plugins section:

      {
          "Name": "GameLiftPlugin",
          "Enabled": true
      },
      {
          "Name": "WebBrowserWidget",
          "Enabled": true
      }
      
  3. Set your project to use the source-built UE editor. Do this step if your game project was created with a non-source-built version of UE. In your game project folder, select the .uproject file and choose the option Switch Unreal Engine Version.

  4. Rebuild the project solution. After completing the previous steps to update your project files, rebuild the solution.

Build the Amazon GameLift C++ Server SDK

Before you can use the plugin inside an Unreal game, you need to build the Amazon GameLift server C++ SDK.

To build the Amazon GameLift server SDK:

  1. Open a terminal/command prompt.
  2. Navigate to the GameLift-Cpp-ServerSDK-<version> folder that was included with the Amazon GameLift SDK Release download.
  3. Follow the below instructions for your platform.

Linux

  1. Run the following commands
    mkdir out
    cd out
    cmake -DBUILD_FOR_UNREAL=1 ..
    make
  2. Once complete, the following file should have been built
    prefix/lib/aws-cpp-sdk-gamelift-server.so
    
  3. Copy the file over to the following location in the Unreal plugin folder:
    GameLiftPlugin/Source/GameLiftServer/ThirdParty/GameLiftServerSDK/Linux/x86_64-unknown-linux-gnu/
    
    Once complete you should have a filepath similar to this example
    GameLiftPlugin/Source/GameLiftServer/ThirdParty/GameLiftServerSDK/Linux/x86_64-unknown-linux-gnu/aws-cpp-sdk-gamelift-server.so 
    

Windows

  1. Run the following commands
    mkdir out
    cd out
    cmake -G "Visual Studio 17 2022" -DBUILD_FOR_UNREAL=1 ..
    msbuild ALL_BUILD.vcxproj /p:Configuration=Release
  2. The above step produces the following binary files required by the plugin.
    prefix\bin\aws-cpp-sdk-gamelift-server.dll  
    prefix\lib\aws-cpp-sdk-gamelift-server.lib
    
  3. Copy the files over to this location in the Unreal plugin folder:
    GameLiftPlugin\Source\GameLiftServer\ThirdParty\GameLiftServerSDK\Win64\
    
    Once complete you should have two filepaths similar to this example
    GameLiftPlugin\Source\GameLiftServer\ThirdParty\GameLiftServerSDK\Win64\aws-cpp-sdk-gamelift-server.dll  
    GameLiftPlugin\Source\GameLiftServer\ThirdParty\GameLiftServerSDK\Win64\aws-cpp-sdk-gamelift-server.lib 
    

For more detailed instructions on how to build the C++ SDK,, please refer to the README.md file located in the C++ SDK directory.

Amazon GameLift Resources

About

The Amazon GameLift Plugin for Unreal contains libraries and native UI that makes it easier to access GameLift resources and integrate GameLift into your Unreal game. You can use the GameLift Unreal Plugin to access GameLift APIs and deploy AWS CloudFormation templates for common gaming scenarios.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages