{"id":13589087,"url":"https://github.com/YetiTech-Studios/UE4GameLiftClientSDK","last_synced_at":"2025-04-08T07:31:43.577Z","repository":{"id":217516076,"uuid":"107637891","full_name":"YetiTech-Studios/UE4GameLiftClientSDK","owner":"YetiTech-Studios","description":"Gamelift Client SDK for Unreal Engine 4.","archived":false,"fork":false,"pushed_at":"2020-01-25T21:24:19.000Z","size":5991,"stargazers_count":78,"open_issues_count":20,"forks_count":41,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-11-06T08:43:38.676Z","etag":null,"topics":["amazon-gamelift","amazon-web-services","aws","aws-gamelift","aws-sdk","gamelift","unreal-engine","unreal-engine-4","unrealengine"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/YetiTech-Studios.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-20T06:00:49.000Z","updated_at":"2024-09-25T17:14:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"723dd4e8-f1ff-458d-9f99-351195ee6d33","html_url":"https://github.com/YetiTech-Studios/UE4GameLiftClientSDK","commit_stats":null,"previous_names":["yetitech-studios/ue4gameliftclientsdk"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YetiTech-Studios%2FUE4GameLiftClientSDK","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YetiTech-Studios%2FUE4GameLiftClientSDK/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YetiTech-Studios%2FUE4GameLiftClientSDK/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YetiTech-Studios%2FUE4GameLiftClientSDK/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YetiTech-Studios","download_url":"https://codeload.github.com/YetiTech-Studios/UE4GameLiftClientSDK/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247796177,"owners_count":20997525,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["amazon-gamelift","amazon-web-services","aws","aws-gamelift","aws-sdk","gamelift","unreal-engine","unreal-engine-4","unrealengine"],"created_at":"2024-08-01T16:00:22.595Z","updated_at":"2025-04-08T07:31:43.555Z","avatar_url":"https://github.com/YetiTech-Studios.png","language":"C++","funding_links":[],"categories":["Plugin","Game Development"],"sub_categories":["Unreal Engine: Resources"],"readme":"# GameLift Client SDK for Unreal Engine 4\n\n![](https://pbs.twimg.com/profile_images/674912463456894981/zpsLHeRC.png)![](https://pbs.twimg.com/profile_images/675419785178382336/G8JCcref.png)![](https://www.cloudwards.net/wp-content/uploads/2015/10/AWS-logo.png)\n\n### What is Amazon GameLift?\nAmazon GameLift is a managed service for deploying, operating, and scaling dedicated game servers for session-based multiplayer games. Amazon GameLift makes it easy to manage server infrastructure, scale capacity to lower latency and cost, match players into available game sessions, and defend from distributed denial-of-service (DDoS) attacks. You pay for the compute resources and bandwidth your games actually use, without monthly or annual contracts.\n\nEpic Games announced [Amazon GameLift support for Unreal Engine 4](https://www.unrealengine.com/en-US/blog/aws-announces-amazon-gamelift-support-for-unreal-engine) but only the server plugin is available. We have made a client plugin for Unreal Engine 4 including Blueprint support that can Create Game Sessions, Describe Game Sessions and Create Player Sessions.\n\n### Whats Included?\n\nThis repository includes source files for the plugin as well as pre-built binaries of Core, GameLift and Cognito Identity from [AWS SDK for C++](https://github.com/aws/aws-sdk-cpp). To know the version of AWS, please check the VersionName in GameLiftClientSDK.uplugin.\n\n#### How to update the AWS binaries\nSince the AWSK SDK constantly changes, it may be beneficial to generate the binaries yourself and replace the ones currently in the plugin. To do this, go to the repository for the [AWS SDK for C++](https://github.com/aws/aws-sdk-cpp) and clone it. Then, run these commands in the AWS SDK directory and make sure the file path of your cloned repository isn't too long!\n```\ncmake -DBUILD_ONLY=\"core;gamelift;cognito-identity\" -DCMAKE_BUILD_TYPE=\"release\"\nmsbuild INSTALL.vcxproj /p:Configuration=Release\n```\nIgnore the errors if you get any. Now go to the \"bin\" folder, then the \"Release\" folder, and copy the files, *aws-cpp-sdk-cognito-identity.dll*, *aws-cpp-sdk-core.dll*, and *aws-cpp-sdk-gamelift.dll* to a separate folder. After that, go back to the main directory, and go to the \"aws-cpp-sdk-cognito-identity\" folder, then the \"Release\" folder and copy the file, \"*aws-cpp-sdk-cognito-identity.lib* to the folder with the dll files. Repeat this last step for the \"aws-cpp-sdk-core\" and aws-cpp-sdk-gamelift\" folders. \n\nOnce those dll and lib files have been gathered, go to the cloned version of this repository, the GameLift Client SDK, and navigate to the GameLiftClientSDK -\u003e ThirdParty -\u003e GameLiftClientSDK -\u003e Win64 folder and replace the dll and lib files with the ones you just made. Then edit the \"GameLiftClientSDK.uplugin\" file in the first/top GameLiftClientSDK folder and replace the \"VersionName\" with the version of AWS that you are using.\n```\n{\n  \"FileVersion\": 3,\n  \"Version\": 1,\n  \"VersionName\": \"1.7.157\", \u003c---- CHANGE THIS\n  \"FriendlyName\": \"GameLift Client SDK\",\n  \"Description\": \"GameLift plugin for creating Game Sessions, Player Sessions etc.\",\n  ...\n}\n```\nFor Linux, navigate to the GameLiftClientSDK -\u003e ThirdParty -\u003e GameLiftClientSDK -\u003e Linux folder and replace the same dll and lib files with the ones you just made. To replace the .so files, go back to the cloned AWS SDK repository, and delete these files: *CMakeCache.txt*, *.deps/CMakeCache.txt*, and the *.deps/build/src* folder. Go back to the top level of the directory and run these commands,\n```\ncmake -DBUILD_ONLY=\"core;gamelift;cognito-identity\" -DCMAKE_BUILD_TYPE=\"release\"\nsudo make install\n```\nIgnore the errors if you get any. Now, you will find a *libaws-cpp-sdk-cognito-identity.so* file in the \"aws-cpp-sdk-cognito-identity\" folder. Copy this .so file as well as the corresponding .so files from the \"aws-cpp-sdk-core\" and \"aws-cpp-sdk-gamelift\" folders. Go back to the Client SDK cloned repository and replace the .so files in the GameLiftClientSDK -\u003e ThirdParty -\u003e GameLiftClientSDK -\u003e Linux folder with the ones you just generated.\n\n### Sounds cool, I'm In! What should I do?\nIf you are using Blueprint-Only project then open your project and add a dummy C++ class from File-\u003eNew C++ class. This is required to generate project files.\n- Download or clone this repository into your **Project/Plugin** folder.\n- Add \"GameLiftClientSDK\" as a public dependency in your **ProjectName.Build.cs** file\n```csharp\nPublicDependencyModuleNames.AddRange(new string[] { \"Core\", \"CoreUObject\", \"Engine\", \"InputCore\", \"GameLiftClientSDK\" });\n```\n- Right click on your project file and select **Generate Visual Studio project files**.\n- Open your projects solution file (*.sln) and build your project.\n- Now if you start your project and go to **Edit-\u003ePlugins** you should see the GameLift Client SDK under **Installed-\u003eYetiTech Studios** category.\n\n#### Dealing with building error `C4577`\n\nIf your build output throws some `C4577` errors when building your project after implementing the plugin, there is one thing you can do to work around it. Open the file [GameLiftClientSDK.Build.cs](https://github.com/YetiTech-Studios/UE4GameLiftClientSDK/blob/master/GameLiftClientSDK/Source/GameLiftClientSDK/GameLiftClientSDK.Build.cs#L9) located at `YourProject/Plugins/GameLiftClientSDK/Source/GameLiftClientSDK/` and after line 9, add the following code fragment:\n\n```cs\nbEnableExceptions = true;\n```\n\nThe final code would look like this:\n\n```cs\npublic class GameLiftClientSDK : ModuleRules\n{\n\tpublic GameLiftClientSDK(ReadOnlyTargetRules Target) : base(Target)\n\t{\n        \tbEnableExceptions = true;\n\n\t\t// ...\n\t}\n}\n```\n\nThen, save the file and build your game again and probably you'll be fine.\n\n### How to use GameLift Client Plugin\nYou can use this plugin either in Blueprints or C++. In any method, you must first create the GameLift client before accessing it. This is done inside the **GameLiftObject**. After initializing the **GameLiftObject** you can access GameLift Client functions. **GameLiftObject** can be created from any Blueprint. For the sake of this tutorial we will do all this inside our custom [GameInstance](https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/Engine/UGameInstance/index.html) class.\n#### Blueprints\n- Open your custom GameInstance Blueprint class.\n- Then add an **Event Init** node.\n- Now connect the init node to **Create Game Lift Object** node. In this node don't forget to type your access key and secret key. See [Managing Access Keys for your AWS Account](http://docs.aws.amazon.com/general/latest/gr/managing-aws-access-keys.html) for more information.\n[![Image](https://i.imgur.com/Tu1RYkt.png)](https://yetitechstudios.imgur.com/all/)\n- Once the above node is created, you are good to create game sessions, player sessions etc. Here is an example network. **NOTE: This is only an example. Implementation might differ according to your project.**\n[![Imgur](https://i.imgur.com/KT6qs7h.png)](https://yetitechstudios.imgur.com/all/)\n\n#### C++\n\u003e **4.17 Users:** If you are getting an error message like in the below picture, make sure you select No. This is a bug in 4.17 and was resolved in 4.18.\n\n[![Imgur](https://i.imgur.com/u3ALYqV.png)](https://yetitechstudios.imgur.com/all/)\n\nMore information here: https://issues.unrealengine.com/issue/UE-49007\n\nHeader file.\n```cpp\n#pragma once\n\n#include \"CoreMinimal.h\"\n#include \"Engine/GameInstance.h\"\n#include \"ExampleGameInstance.generated.h\"\n\n\nUCLASS()\nclass GAMELIFTPLUGINTEST_API UExampleGameInstance : public UGameInstance\n{\n\tGENERATED_BODY()\n\t\nprivate:\n\tUPROPERTY()\n\tclass UGameLiftClientObject* GameLiftClientObject;\n\npublic:\n\n\tvirtual void Init() override;\n\n\t// Create Game Session ///////////////////////////////////////////////////\n\tvoid CreateGameSession();\n\tUFUNCTION()\n\tvoid OnGameCreationSuccess(const FString\u0026 GameSessionID);\n\tUFUNCTION()\n\tvoid OnGameCreationFailed(const FString\u0026 ErrorMessage);\n\n\t// Describe Game Session /////////////////////////////////////////////////\n\tvoid DescribeGameSession(const FString\u0026 GameSessionID);\n\tUFUNCTION()\n\tvoid OnDescribeGameSessionSuccess(const FString\u0026 SessionID, EGameLiftGameSessionStatus SessionState);\n\tUFUNCTION()\n\tvoid OnDescribeGameSessionFailed(const FString\u0026 ErrorMessage);\n\n\t// Create Player Session /////////////////////////////////////////////////\n\tvoid CreatePlayerSession(const FString\u0026 GameSessionID, const FString UniquePlayerID);\n\tUFUNCTION()\n\tvoid OnPlayerSessionCreateSuccess(const FString\u0026 IPAddress, const FString\u0026 Port, const FString\u0026 PlayerSessionID);\n\tUFUNCTION()\n\tvoid OnPlayerSessionCreateFail(const FString\u0026 ErrorMessage);\n};\n```\n\nSource file.\n```cpp\n#include \"ExampleGameInstance.h\"\n#include \"Kismet/GameplayStatics.h\"\n#if WITH_GAMELIFTCLIENTSDK\n#include \"GameLiftClientSDK/Public/GameLiftClientObject.h\"\n#include \"GameLiftClientSDK/Public/GameLiftClientApi.h\"\n#endif\n\nvoid UExampleGameInstance::Init()\n{\n\tSuper::Init();\n#if WITH_GAMELIFTCLIENTSDK\n    // Create the game lift object. This is required before calling any GameLift functions.\n\tGameLiftClientObject = UGameLiftClientObject::CreateGameLiftObject(\"Your Access Key\", \"Your Secret Key\");\n#endif\n}\n\nvoid UExampleGameInstance::CreateGameSession()\n{\n#if WITH_GAMELIFTCLIENTSDK\n\tFGameLiftGameSessionConfig MySessionConfig;\n\tMySessionConfig.SetAliasID(\"Your Alias ID\");\n\tMySessionConfig.SetMaxPlayers(10);\n\tUGameLiftCreateGameSession* MyGameSessionObject = GameLiftClientObject-\u003eCreateGameSession(MySessionConfig);\n\tMyGameSessionObject-\u003eOnCreateGameSessionSuccess.AddDynamic(this, \u0026UExampleGameInstance::OnGameCreationSuccess);\n\tMyGameSessionObject-\u003eOnCreateGameSessionFailed.AddDynamic(this, \u0026UExampleGameInstance::OnGameCreationFailed);\n\tMyGameSessionObject-\u003eActivate();\n#endif\n}\n\nvoid UExampleGameInstance::OnGameCreationSuccess(const FString\u0026 GameSessionID)\n{\n\tDescribeGameSession(GameSessionID);\n}\n\nvoid UExampleGameInstance::OnGameCreationFailed(const FString\u0026 ErrorMessage)\n{\n#if WITH_GAMELIFTCLIENTSDK\n\t// Do stuff...\n#endif\n}\n\nvoid UExampleGameInstance::DescribeGameSession(const FString\u0026 GameSessionID)\n{\n#if WITH_GAMELIFTCLIENTSDK\n\tUGameLiftDescribeGameSession* MyDescribeGameSessionObject = GameLiftClientObject-\u003eDescribeGameSession(GameSessionID);\n\tMyDescribeGameSessionObject-\u003eOnDescribeGameSessionStateSuccess.AddDynamic(this, \u0026UExampleGameInstance::OnDescribeGameSessionSuccess);\n\tMyDescribeGameSessionObject-\u003eOnDescribeGameSessionStateFailed.AddDynamic(this, \u0026UExampleGameInstance::OnDescribeGameSessionFailed);\n\tMyDescribeGameSessionObject-\u003eActivate();\n#endif\n}\n\nvoid UExampleGameInstance::OnDescribeGameSessionSuccess(const FString\u0026 SessionID, EGameLiftGameSessionStatus SessionState)\n{\n\t// Player sessions can only be created on ACTIVE instance.\n\tif (SessionState == EGameLiftGameSessionStatus::STATUS_Active)\n\t{\n\t\tCreatePlayerSession(SessionID, \"Your Unique Player ID\");\n\t}\n}\n\nvoid UExampleGameInstance::OnDescribeGameSessionFailed(const FString\u0026 ErrorMessage)\n{\n#if WITH_GAMELIFTCLIENTSDK\n\t// Do stuff...\n#endif\n}\n\nvoid UExampleGameInstance::CreatePlayerSession(const FString\u0026 GameSessionID, const FString UniquePlayerID)\n{\n#if WITH_GAMELIFTCLIENTSDK\n\tUGameLiftCreatePlayerSession* MyCreatePlayerSessionObject = GameLiftClientObject-\u003eCreatePlayerSession(GameSessionID, UniquePlayerID);\n\tMyCreatePlayerSessionObject-\u003eOnCreatePlayerSessionSuccess.AddDynamic(this, \u0026UExampleGameInstance::OnPlayerSessionCreateSuccess);\n\tMyCreatePlayerSessionObject-\u003eOnCreatePlayerSessionFailed.AddDynamic(this, \u0026UExampleGameInstance::OnPlayerSessionCreateFail);\n\tMyCreatePlayerSessionObject-\u003eActivate();\n#endif\n}\n\nvoid UExampleGameInstance::OnPlayerSessionCreateSuccess(const FString\u0026 IPAddress, const FString\u0026 Port, const FString\u0026 PlayerSessionID)\n{\n#if WITH_GAMELIFTCLIENTSDK\n\tconst FString TravelURL = IPAddress + \":\" + Port;\n\tUGameplayStatics::GetPlayerController(this, 0)-\u003eClientTravel(TravelURL, ETravelType::TRAVEL_Absolute);\n#endif\n}\n\nvoid UExampleGameInstance::OnPlayerSessionCreateFail(const FString\u0026 ErrorMessage)\n{\n#if WITH_GAMELIFTCLIENTSDK\n\t// Do stuff...\n#endif\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FYetiTech-Studios%2FUE4GameLiftClientSDK","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FYetiTech-Studios%2FUE4GameLiftClientSDK","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FYetiTech-Studios%2FUE4GameLiftClientSDK/lists"}