Code Monkey home page Code Monkey logo

aws / amazon-gamelift-plugin-unreal Goto Github PK

View Code? Open in Web Editor NEW
20.0 4.0 12.0 87.74 MB

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.

Home Page: https://aws.amazon.com/gamelift/getting-started/

License: Apache License 2.0

Batchfile 0.01% Python 0.12% C# 0.02% C++ 96.73% C 3.10% PowerShell 0.03%

amazon-gamelift-plugin-unreal's Introduction

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

amazon-gamelift-plugin-unreal's People

Contributors

amayreh-gamelift avatar amazon-auto avatar amzn-daimini avatar forkercat avatar wenxiul avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

amazon-gamelift-plugin-unreal's Issues

Will MFA be available in the future?

There is no field to enter an MFA token in the plugin's Manage AWS user Profiles configuration screen, and it appears that IAM users with MFA enabled cannot access the plugin.
For security reasons, we feel that using access keys without MFA is risky and would like to see MFA support in a future update.
Are there any plans to do so?

Support for UE4.27

Currently UE4.27 is still the best for the following:

  • Mobile Development
  • Online Web Apps
  • Performant Games for low-end devices
    When will we see this available for UE4.27?

Error importing GameLiftServerSDK module for v1.1.0

I encountered error running the built server executable with the new v1.1.0 release. Specifically, there's error importing the "GameLiftServerSDK" module into the gamlift plugin.
This can be fixed by going to amazon-gamelift-plugin-unreal/GameLiftPlugin/Source/GameLiftServer/Source/GameLiftServerSDK/Private/GameLiftServerSDK.cpp and 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"));

and also deleting the amazon-gamelift-plugin-unreal/GameLiftPlugin/Source/GameLiftServer/GameLiftServerSDK.uplugin file.
I expect others will encounter the same problem if you cloned the standalone code from github and directly copied the C++ Server SDK Plugin for Unreal source code into the amazon-gamelift-plugin-unreal/GameLiftPlugin/Source/GameLiftServer directory. Applying the above changes should fix the module import issue.

Missing GameLiftServerSDK

latest commit is missing the contents of "\amazon-gamelift-plugin-unreal\GameLiftPlugin\Source\GameLiftServer" and has a REPLACEME.md file instead

Plugin not showing up in Unreal Engine 5.3 under MacOS 14

Tried integrating the plugin into UE5.3 under MacOS 14, M1 Max. Engine was built from source, fresh C++ project. The solution build is successful and the plugin is recognized by the engine but no button or menu shows up to actually use the plugin to integrate the SDKs into the project. See screenshot attached.

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.