Questions tagged with Game Tech
Content language: English
Sort by most recent
So I uploaded a build which I have tested on the lcoal gamelift sdk and was able to create sessions using the terminal command. However, When I uploaded the build and created a fleet, i am unable to start a session. In describe sessions, i am returned empty array. however, when I try to create a session, "An error occurred (FleetCapacityExceededException) when calling the CreateGameSession operation: Unable to reserve a process on fleet is being received. how can I solve this issue?
I try to do real-time game by AWS Gamelift. I don't know how to connect to AWS RDS with lambda when the game initialize to get the data of AWS RDS and save the client's data when one player sends data to other players.
I am working on an Unreal Engine 5 project and want to deploy the game on AWS infrastructure (Gamelift). But came to know that the Gamelift Server SDK and Gamekit doesn't support UE5 as of now. Is there any way around to deploy UE5 game server and backend on AWS or is it like 'if you guys are building on UE5, you have to wait until we roll out an update sometime in the future'? It will be really encouraging if you can share some good documentation/ articles on the topic as well.
Hello GameKit Devs,
We are excited to announce [AWS GameKit](https://aws.amazon.com/gamekit/) is now available for the Unity game engine. AWS GameKit allows game developers to deploy and customize game backend features directly from a game engine. AWS GameKit launched on March 23, 2022 with support for Unreal Engine and with today’s release for Unity, game developers can integrate the following cloud-based game features into Win64, MacOS, Android, or iOS games from both the Unreal and Unity engines with just a few clicks:
**Identity and Authentication:** Create unique identities for each player and allow players to sign into the game. Verify player identities and manage player sessions.
**Achievements:** Create and track game-related rewards earned by players.
**Game State Cloud Saving:** Maintain a synchronized copy of player game progress in AWS to allow players to resume gameplay across sessions.
**User Gameplay Data:** Maintain game-related data for each player, such as inventory, statistics, and cross-play persistence.
Game developers can find the AWS GameKit for Unity in the [GitHub repository](https://github.com/aws/aws-gamekit-unity).
Nidhi Gupta, GameKit PM
I am trying to build the AWS C++ SDK to use with the Unreal game engine. I have been using it for a while, however after recently updating my Unreal plugin with the latest SDK components, I ran into issues (crashes) because Unreal has its own custom memory management which does not seem compatible with the AWS SDK's.
To resolve this I have tried to override AWS's memory manager with one compatible with Unreal, by implementing `Aws::Utils::Memory::MemorySystemInterface` and calling `Aws::Utils::Memory::InitializeAWSMemorySystem(AWSMemoryManager);`
This, however, doesn't work unless the SDK has been built with the `CUSTOM_MEMORY_MANAGEMENT` flag. So, I went back to the SDK and tried to build it with custom memory management on with the following commands:
```
cmake.exe "../aws-sdk-cpp" -DCMAKE_BUILD_TYPE=Release -DBUILD_ONLY="core;firehose;cognito-identity" -DCUSTOM_MEMORY_MANAGEMENT=1 -DCPP_STANDARD=17 -DENABLE_UNITY_BUILD=1
MSBuild.exe ALL_BUILD.vcxproj -p:Configuration=Release
```
However, this seems to result in aws-core failing its unit tests. I get the following errors:
```
...\AWS\sdk\aws-sdk-cpp\aws-cpp-sdk-core-tests\RunTests.cpp(40): error : Expected equality of these values: [...\AWS\sdk\membuild\aws-cpp-sdk-core-tests\aws-cpp-sdk-core-tests.vcxproj]
memorySystem.GetCurrentOutstandingAllocations()
Which is: 37
0ULL
Which is: 0
...\AWS\sdk\aws-sdk-cpp\aws-cpp-sdk-core-tests\RunTests.cpp(40): error : Expected equality of these values: [...\AWS\sdk\membuild\aws-cpp-sdk-core-tests\aws-cpp-sdk-core-tests.vcxproj]
memorySystem.GetCurrentBytesAllocated()
Which is: 3472
0ULL
Which is: 0
...\AWS\sdk\aws-sdk-cpp\aws-cpp-sdk-core-tests\RunTests.cpp(40): error : Value of: memorySystem.IsClean() [...\AWS\sdk\membuild\aws-cpp-sdk-core-tests\aws-cpp-sdk-core-tests.vcxproj]
Actual: false
Expected: true
```
Does anyone have any clue why these unit tests are failing and how I can go about resolving it?
Hello,
We have a Battle Royale game supporting 10 teams of 3 players each for a total of 30 players per match.
We want to be able to start matches with less than 10 teams if they have been waiting for a long time.
For example, if there are 8 teams who have been matchmaking for 5 minutes, we want to be able to start the game with those 8 teams if 10 minutes have passed and no other team has joined.
We have looked into Expansions, but we can't reduce the "Quantity" of teams. This forces us to only start matches with at least 10 teams.
This is our current rule set:
```
{
"name": "trios_battle_royale",
"ruleLanguageVersion": "1.0",
"playerAttributes": [{
"name": "skill",
"type": "number",
"default": 10
}],
"teams": [{
"name": "t1",
"minPlayers": 3,
"maxPlayers": 3,
"quantity": 10
}]
}
```
How do we start matches with less than 10 teams?
We are currently setting up some authentication systems for our UE4 game servers so that we are sure they are the only devices/users that are capable of accessing our internal API / LAMDBA functions.
With that in mind, there is a desire to not hard code any COGNITO user ID's or tokens into the actual server-code itself. Instead, we would like to pursue having these tokens be generated and cycled through on AWS's side, to keep it decoupled. We are undecided whether these tokens should be for the life of the Gamelift server or for a set period of time—whichever is most feasible. This way, if we need to adjust access to certain features down the road, it will not require an update to the deployed Unreal Engine server build.
Does AWS API or LAMDBA have any features out of the box to check if an API request is coming from within AWS, ideally from one of the active Gamelift instances?
While we may still need to create a COGNITO identity for the servers, or just check the local IP of the running Gamelift servers, the ideal flow would look like:
1) UE4 game server on AWS asks for a token on Startup.
2) LAMDBA Authorization script checks to make sure it is valid and coming from within AWS/Gamelift
3) Once Validated, LAMDBA function provides a token to enable server to use in backend LAMDBA functions.
4) Before Gamelift Server shutdown, revoke access or add to a "black-listed" token Database to prevent second use before token expiration.
What is the best practice for securing and separating a UE4 server's ability—hosted via Gamelift—to update databases and perform other tasks that ***only*** the server should see and have access to?
The methods we have come up with are:
1) With an Auth Token to an internal API: utilize Pre-processor directives so that these functions and tokens are never even shipped with the client. (The downside to this is that most of our team is allergic to formal code, so we are not sure how UE4 handles segregated, pre-processor directives that are Blueprint callable functions. Will this cause problems if the Blueprint UFunction ends up being removed on the client?)
2) Same as 1, but have the servers make a GET request on startup to receive dynamically generated and cycled auth tokens.
What method should we be pursuing to secure our UE4 server's ability to modify databases etc?
Hi,
I am using flexmatch in automatic backfill mode and encounters a problem in the following situation:
- A player is put in a game session through matchmaking
- the player leaves the session (and thus triggers a call to RemovePlayerSession)
- the player then restarts the matchmaking process ( which triggers a call to StartMatchmaking in our backend )
I expected the player to be put back in the same game session but Flexmatch creates a new game session. Is there a way to change this behavior?
Hi all, I have an existing game using Unity for the frontend, but NodeJS for the backend. I can't port my backend over to Unity any time soon, so I've managed to get it working on GameLift in its current state. But there's room for improvement. First I'll explain how I've set it up:
1. Used an unofficial AWS GameLift NodeJS Server SDK (https://github.com/dplusic/GameLift-Nodejs-ServerSDK). (Apologies if it's against the rules to link to unofficial SDKs here - I'm happy to redact this, just thought it would add some context)
2. Prepackaged a NodeJS v16 binary into the build zip that I upload to GameLift
3. Prepackaged my node_modules folders (all of the dependencies) in the build zip
4. My startup script (start.sh) sets up the NodeJS binary and executes Node within the calling process
Here's what my start.sh looks like:
```
#!/bin/bash
echo "Running 'node src/game-lift/GameLift.js' from Process ID $$"
echo "Setting up node"
PWD=`pwd`
PATH=$PATH:$PWD/deps/node-v16.16.0-linux-x64/bin
node --version
echo "Executing 'node dist/src/game-lift/GameLift.js'"
exec node dist/src/game-lift/GameLift.js
```
`exec` ensures that NodeJS is run within the same process as the calling script, so that GameLift can monitor the process for irregularities (I assume).
I launch the Fleet with the following command:
```
aws gamelift create-fleet \
--name REDACTED-fleet-name \
--build-id build-REDACTED \
--ec2-instance-type m5.large \
--ec2-inbound-permissions 'FromPort=1234,ToPort=1234,IpRange=0.0.0.0/0,Protocol=TCP' \
--fleet-type ON_DEMAND \
--runtime-configuration 'ServerProcesses=[{LaunchPath=/local/game/start.sh,ConcurrentExecutions=1}],MaxConcurrentGameSessionActivations=1,GameSessionActivationTimeoutSeconds=600'
```
Two concerns about this approach:
1. Prepackaging NodeJS is not cool / sustainable. I'd rather install it in install.sh, using some platform independent method.
2. Running `exec` to ensure Node doesn't break out into another process seems hacky and potentially problematic. I would rather set the launch path to simply `node` and add the script as a parameter. For example:
```
--runtime-configuration 'ServerProcesses=[{LaunchPath=node,Parameters=dist/src/game-lift/GameLift.js,ConcurrentExecutions=1}],MaxConcurrentGameSessionActivations=1,GameSessionActivationTimeoutSeconds=600'
```
Maybe I'm overthinking item #2 - it might not be a problem as-is
But as for #1, I would love to take advantage of that install.sh script. Previously I was installing NodeJs in install.sh via N (https://github.com/mklement0/n-install). But I found that Node was not available in start.sh. I even SSH'd in and it seemed like NodeJS was not installed.
**Question #1**:
Am I misunderstanding what install.sh does? Should I be able to use it to install NodeJS (or any dependency) and later on use that dependency in my launch script?
**Question #2**:
Anyone got any tips on how to install Node in GameLift reliably? Yum? N? Nvm? etc.
I know NodeJS isn't officially supported, but I'm hoping to get just a general idea of what should and should not be possible in GameLift. Any help would be greatly appreciated.
Hello! I'm porting to PS5 an existing UE4 game that uses Gamelift for multiplayer. I did not find a UE4 plugin for Gamelift with PS5 support already available, so I tried cloning the aws repository and building Gamelift from source using the PS5 SDK compiler and CMake integration. But I get a compilation error on the third party dependencies and I don't know how to fix them. Here is the output log:
```
cmake.exe -DCMAKE_TOOLCHAIN_FILE="D:\Utils\PS5\Prospero\Tools\CMake\PS5.cmake" -A Prospero ./.. -DBUILD_ONLY=gamelift
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.37.0.windows.1")
-- TARGET_ARCH not specified; inferring host OS to be platform compilation target
-- Building AWS libraries as shared objects
-- Generating windows build config
-- Building project version: 1.8.187
-- Configuring Prospero
--
-- Configuring done
-- Generating done
-- Build files have been written to: D:/Utils/aws_sdk/out-ps5/.deps
Microsoft (R) Build Engine version 16.11.2+f32259642 pour .NET Framework
Copyright (C) Microsoft Corporation. Tous droits réservés.
Checking Build System
Performing configure step for 'AwsCCommon'
-- Configuring Prospero
--
CMake Deprecation Warning at CMakeLists.txt:25 (cmake_policy):
The OLD behavior for policy CMP0077 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
-- attempting to use sanitizer list address;undefined
-- Packaging is only supported on Linux
-- Configuring done
-- Generating done
CUSTOMBUILD : CMake warning : [D:\Utils\aws_sdk\out-ps5\.deps\AwsCCommon.vcxproj]
Manually-specified variables were not used by the project:
CMAKE_TOOLCHAIN_FILE
-- Build files have been written to: D:/Utils/aws_sdk/out-ps5/.deps/build/src/AwsCCommon-build
Building Custom Rule D:/Utils/aws_sdk/third-party/CMakeLists.txt
Performing build step for 'AwsCCommon'
Microsoft (R) Build Engine version 16.11.2+f32259642 pour .NET Framework
Copyright (C) Microsoft Corporation. Tous droits réservés.
Checking Build System
Building Custom Rule D:/Utils/aws_sdk/out-ps5/.deps/build/src/AwsCCommon/CMakeLists.txt
environment.c
D:\Utils\aws_sdk\out-ps5\.deps\build\src\AwsCCommon\source\posix\environment.c(26,25): error : implicit declaration of function 'getenv' is invalid in C99 [-Werror,-Wimplicit-function-declaration] [D:\Utils\aws_sdk\out-ps5\.deps\build\src\AwsCCommon-build\aws-c-common.vcxproj] [D:\Utils\aws_sdk\out-ps5\.deps\AwsCCommon.vcxproj]
const char *value = getenv(aws_string_c_str(variable_name));
^
D:\Utils\aws_sdk\out-ps5\.deps\build\src\AwsCCommon\source\posix\environment.c(26,17): error : incompatible integer to pointer conversion initializing 'const char *' with an expression of type 'int' [-Werror,-Wint-conversion] [D:\Utils\aws_sdk\out-ps5\.deps\build\src\AwsCCommon-build\aws-c-common.vcxproj] [D:\Utils\aws_sdk\out-ps5\.deps\AwsCCommon.vcxproj]
const char *value = getenv(aws_string_c_str(variable_name));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\Utils\aws_sdk\out-ps5\.deps\build\src\AwsCCommon\source\posix\environment.c(42,9): error : implicit declaration of function 'setenv' is invalid in C99 [-Werror,-Wimplicit-function-declaration] [D:\Utils\aws_sdk\out-ps5\.deps\build\src\AwsCCommon-build\aws-c-common.vcxproj] [D:\Utils\aws_sdk\out-ps5\.deps\AwsCCommon.vcxproj]
if (setenv(aws_string_c_str(variable_name), aws_string_c_str(value), 1) != 0) {
^
D:\Utils\aws_sdk\out-ps5\.deps\build\src\AwsCCommon\source\posix\environment.c(50,9): error : implicit declaration of function 'unsetenv' is invalid in C99 [-Werror,-Wimplicit-function-declaration] [D:\Utils\aws_sdk\out-ps5\.deps\build\src\AwsCCommon-build\aws-c-common.vcxproj] [D:\Utils\aws_sdk\out-ps5\.deps\AwsCCommon.vcxproj]
if (unsetenv(aws_string_c_str(variable_name)) != 0) {
^
4 errors generated.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5): error MSB8066: la build personnalisée de 'D:\Utils\aws_sdk\out-ps5\.deps\CMakeFiles\5f1e4345a9d911eaa5fc8616d695c793\AwsCCommon-configure.rule;D:\Utils\aws_sdk\out-ps5\.deps\CMakeFiles\5f1e4345a9d911eaa5fc8616d695c793\AwsCCommon-build.rule;D:\Utils\aws_sdk\out-ps5\.deps\CMakeFiles\5f1e4345a9d911eaa5fc8616d695c793\AwsCCommon-install.rule;D:\Utils\aws_sdk\out-ps5\.deps\CMakeFiles\291e455fb70b57eb98a005f919e01343\AwsCCommon-complete.rule;D:\Utils\aws_sdk\out-ps5\.deps\CMakeFiles\075aa0e2c4544e3f37305cb661ccfd02\AwsCCommon.rule;D:\Utils\aws_sdk\third-party\CMakeLists.txt' s'est arrêtée. Code 1. [D:\Utils\aws_sdk\out-ps5\.deps\AwsCCommon.vcxproj]
Performing configure step for 'AwsChecksums'
-- Configuring Prospero
--
-- Configuring done
-- Generating done
CUSTOMBUILD : CMake warning : [D:\Utils\aws_sdk\out-ps5\.deps\AwsChecksums.vcxproj]
Manually-specified variables were not used by the project:
CMAKE_TOOLCHAIN_FILE
-- Build files have been written to: D:/Utils/aws_sdk/out-ps5/.deps/build/src/AwsChecksums-build
Building Custom Rule D:/Utils/aws_sdk/third-party/CMakeLists.txt
Performing build step for 'AwsChecksums'
Microsoft (R) Build Engine version 16.11.2+f32259642 pour .NET Framework
Copyright (C) Microsoft Corporation. Tous droits réservés.
Checking Build System
Building Custom Rule D:/Utils/aws_sdk/out-ps5/.deps/build/src/AwsChecksums/CMakeLists.txt
aws-checksums.vcxproj -> D:\Utils\aws_sdk\out-ps5\bin\Release\libaws-checksums.so
Building Custom Rule D:/Utils/aws_sdk/out-ps5/.deps/build/src/AwsChecksums/CMakeLists.txt
prospero-lld : error : cannot open Release\aws-checksums_stub_weak.a: no such file or directory [D:\Utils\aws_sdk\out-ps5\.deps\build\src\AwsChecksums-build\aws-checksums-tests.vcxproj] [D:\Utils\aws_sdk\out-ps5\.deps\AwsChecksums.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5): error MSB8066: la build personnalisée de 'D:\Utils\aws_sdk\out-ps5\.deps\CMakeFiles\67b316f4a8998627537e1875c6cc3c62\AwsChecksums-configure.rule;D:\Utils\aws_sdk\out-ps5\.deps\CMakeFiles\67b316f4a8998627537e1875c6cc3c62\AwsChecksums-build.rule;D:\Utils\aws_sdk\out-ps5\.deps\CMakeFiles\67b316f4a8998627537e1875c6cc3c62\AwsChecksums-install.rule;D:\Utils\aws_sdk\out-ps5\.deps\CMakeFiles\291e455fb70b57eb98a005f919e01343\AwsChecksums-complete.rule;D:\Utils\aws_sdk\out-ps5\.deps\CMakeFiles\075aa0e2c4544e3f37305cb661ccfd02\AwsChecksums.rule;D:\Utils\aws_sdk\third-party\CMakeLists.txt' s'est arrêtée. Code 1. [D:\Utils\aws_sdk\out-ps5\.deps\AwsChecksums.vcxproj]
CMake Error at CMakeLists.txt:224 (message):
Failed to build third-party libraries.
-- Configuring incomplete, errors occurred!
```
So I have two questions:
- am I doing all this for nothing and is there a precompiled PS5 library available upon request?
- if not, could you help me fix the compile error so I can make my own plugin with PS5 support?
Thanks!
I am getting below error when in fleet activation status
**Server process started correctly but did not call InitSDK() or ProcessReady() within 5 minutes, launchPath(/local/game/Woah.x86_64), arguments(null), instanceId(i-0c0c1ec4d69e87b9e)**
Not sure what is the issue here. the uploaded build is running fine on my local machine.