Questions tagged with Game Server Hosting & Backends
Content language: English
Sort by most recent
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?
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 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,
Here is my setup:
* Using GameLift to host custom server for my game
* Server is a headless Unity app
* Server (and, therefore, client) uses Photon Fusion for simulation
* I've integrated the SDKs, and everything works when testing with GameLift Local
My problem:
When I create a build and deploy it on a GL fleet, the server app fails to start the Fusion server with the following error:
EntryPointNotFoundException: nanosockets_address_set_ip
Of course, I've asked Photon for support first. They said that this error means that either the nanosocket .dlls are missing from my build or the executable can't access them. Since both .dlls are present in the correct locations, it seems like the app just can't access them.
The weird part is that they're both inside the C:\Game folder (2 or 3 levels down in subfolders, but still). From what I've read in the AWS docs, the app should be sandboxed but have access to its own folder (C:\Game). Does anyone have an idea why my app wouldn't be able to access the Fusion .dlls?
My team has been stuck on this issue for days, so any help or pointers would be appreciated.
Thanks in advance!
Hello, I'm having some issues while using the JavaScript SDK (S3.ManagedUpload) to dynamically upload images to an S3 Bucket.
Right now I have a bucket that contains a folder for every resource, and the folder is identified by the resource's ID (which is unique).
Everything works perfectly when trying to upload one image at a time, however when trying to concurrently upload multiple files to the same folder (eg: :resourceId/*), some images get deleted after a short amount of time (even though I get no errors at all during the upload).
I tried firing a GetObject right after uploading them and they indeed exist, however if I ping them again after a short delay, some return a "Key Not Found" error
Any help would be appreciated, thanks.
I am running my Unity (2021.3.1f1) servers on ECS using Fargate. When I test the game, I run a single task with 1vCPU and 2GB of memory and I connect 2 clients to the server. The server tends to lag about every 3 seconds, making the game far less enjoyable. I have enabled Container Insights and I found that the CPU and memory usage was nowhere near the 50% mark and the task's network usage seemed fine to me as well.
I am now wondering if this issue could be related to the AWS services I use and the way I have set them up or if I should be looking for the issue inside my network code.
Hello everyone,
I've been a software and game developer for well over a decade, and I feel very at home with C, C++ and C#/.NET. I've done a lot of programming with DirectX SDKs and Unity, as well as desktop and mobile development. However, I don't really know much at all about the web and networking. But now I'm becoming very interested in what kinds of things I can do with AWS in game development, as well as with blockchain, AI/ML and cloud computing power. There seems to be more AWS services and packages than I can count though, and I'm really not sure which ones I should be pursuing and trying to learn more about and which ones are irrelevant to me and my job. The list of services, SDKs and packages is as impressive and inspiring as it is overwhelming and confusing!
I'd like to be able to deploy some .NET applications to AWS to provide remote APIs for games and applications. To start with and get the hang of it, I just want to make a little minigame that lives on a server that a Unity or Unreal game can interact with through http requests. And I'll incrementally add some features to it as I start to get the hang of it. I'd also like to do some experimentation with blockchain software and services and see what kinds of interesting things can be accomplished with it. And beyond that, I'd eventually like to get into using AI/ML to accomplish goals in games and apps, harness cloud-based CPU/GPU processing power for heavy-lifting and even setup some real-time multiplayer game servers.
I just don't know what tools/services/packages I need to dive into and start figuring out. I've found [the Visual Studio 2022 AWS package here](https://marketplace.visualstudio.com/items?itemName=AmazonWebServices.AWSToolkitforVisualStudio2022&ssr=false#overview), as well as [this AWS GitHub page](https://github.com/aws/dotnet) for .NET. I've also heard about Lambda. I really have no idea which ones are relevant to me or where I should start with this. To begin with, I want to run a .NET application on a server that applications can query and interact with and have it store and supply data for them, offer some remote APIs and requests, etc. I'd also potentially be interested in running some native C/C++ modules on servers.
Can someone point me in the right direction and tell me what I need to set up and dive into first? I'm doing this in my free time when I'm not working on projects for work, so my time is very limited and researching and learning the wrong things would be a big setback for me. Any help or guidance is greatly appreciated!