GameLift Android build


I have sucessfully implemented gamelift server and client in unreal project.

I have built dedicated server + client for PC, and everything works fine.

But, i want to build for Android, how can i build gamelift for Android? Probably i need first to build library for Android?

Currently when i try to build .apk from unreal with current setup, i’m getting this error:

[59/365] Module.GameLiftClientSDK.gen.cpp [armv7-es2]
UATHelper: Packaging (Android (ASTC)): In file included from D:/Projects/Private/GameLift/Plugins/GameLiftClientSDK/Intermediate/Build/Android/GameLift/Development/GameLiftClientSDK/Module.GameLiftClientSDK.gen.cpp:2:
UATHelper: Packaging (Android (ASTC)): In file included from D:\Projects\Private\GameLift\Plugins\GameLiftClientSDK\Intermediate\Build\Android\GameLift\Inc\GameLiftClientSDK\GameLiftClientApi.gen.cpp:8:
UATHelper: Packaging (Android (ASTC)): In file included from D:/Projects/Private/GameLift/Plugins/GameLiftClientSDK/Source\GameLiftClientSDK/Public/GameLiftClientApi.h:9:
UATHelper: Packaging (Android (ASTC)): In file included from D:/Projects/Private/GameLift/Plugins/GameLiftClientSDK/Source/GameLiftClientSDK/Public/aws/gamelift/GameLiftClient.h:18:
UATHelper: Packaging (Android (ASTC)): D:/Projects/Private/GameLift/Plugins/GameLiftClientSDK/Source/GameLiftClientSDK/Public\aws/gamelift/GameLiftErrors.h(74,3): error: unknown type name '__declspec'
UATHelper: Packaging (Android (ASTC)): AWS_GAMELIFT_API Aws::Client::AWSError<Aws::Client::CoreErrors> GetErrorForName(const char* errorName);
UATHelper: Packaging (Android (ASTC)): ^
UATHelper: Packaging (Android (ASTC)): D:/Projects/Private/GameLift/Plugins/GameLiftClientSDK/Source/GameLiftClientSDK/Public\aws/gamelift/GameLift_EXPORTS.h(38,30): note: expanded from macro 'AWS_GAMELIFT_API'
UATHelper: Packaging (Android (ASTC)): #define AWS_GAMELIFT_API __declspec(dllimport)
UATHelper: Packaging (Android (ASTC)): ^

Update: Is it legit to remove gamelift client, and create everything in lambda, client (unreal-android) can send http request (throught apiGateway) to create player session, so player session is created and return back to client response, so client can join to that session?

Or for example: Player can send http request for session search, lambda function will return back to client possible sessions?

And with this, i’m avoiding that clients need to create session…is this right way?

So, if everything is correct that i have asked, is it later possible to integrate flexmatch?


Sorry for the late reply, this is pretty much GameLift’s recommended approach, which is to have clients calling some client service that performs actions on their behalf to avoid having to embed AWS credentials in the client or provide direct permissions to create resources.


Theres a useful example (without API Gateway because its built for simplicity) here that could be useful to look at:

(this is using the new realtime server approach but it still needs to create / find game sessions and create player sessions)

I forgot about this blog post which proposes a similar architecture:

The documentation shows for Unity sample and Unity SDK. Where can I get help with Unreal Engine ?

If you’re following Pip’s serverless architecture approach, then the approach is platform agnostic meaning the idea is the same regardless of the engine being used in that APIs are used to communicate with AWS services like GameLift and the Unreal client, regardless of its platform, can use those APIs via HTTP requests or embedding the AWS SDK directly into your client. From experience, I’ve found the latter method to be a little more difficult.