As Covid-19 pandemic hit the world, everyone was locked down in their own homes. At start, it was little fun to binge all TV shows, Movies, etc. As physical sports were put on hold due to lockdown, Virtual sports began to come into existence for almost everyone. Earlier it was only few people who used to play Mobile/PC games regularly, but since many of us getting bored, we figured out how to play with friends virtually.
It comes as no surprise that gaming usage and viewership of gaming video content spiked in 2020, as consumers spent more time at home and the video game industry provided a means to stay entertained and connected with friends.
With this spike in DAU’s many of gaming companies were not able to manage load and hence it tampered user experience along with revenue for gaming companies. Those who have their own on-premise gaming servers, lost in their own game because of scalability issues.
AWS GameLift is managed service which can be used to tackle all types of Game Server Scalability issues. AWS GameLift comes with multiple services as follows:
1. AWS GameLift Custom Server
2. AWS GameLift Realtime Server
3. AWS GameLift FleetIQ
Let’s talk about each of above service one-by-one, highlighting the important points which are hard to catch in vast documentation of AWS.
It’s a fully managed service for deploying, operating, and scaling session-based, multiplayer game servers. GameLift Hosting replaces the work required to host your own custom game servers, including buying and setting up hardware and managing ongoing activity, security, storage, and performance tracking.
The two main key components of GameLift Hosting-based solutions include:
In addition to GameLift, you always need to host a backend service for your game. The backend will use GameLift APIs to initiate matchmaking and request game session placement. Popular options for game backend hosting include serverless backends with Amazon API Gateway and AWS Lambda, or container-based backends with Elastic Load Balancing and Amazon ECS. Backend service can also be called as API Service which will call GameLift API’s. This can be integrated with backend server of game.
This is the actual fleet of EC2 instances hosted by GameLift, which is running your game server build with your defined configuration and scaling logic. GameLift fleet will be the actual game servers which will relay the data from one user to another. When created the Game Build, the build is deployed on these servers which are scaled and managed by GameLift Service.
1. Many of us get confused while reading the documentation around the terms Client, Backend Server and Game Server. Let's clear the confusion, below:
Client is the actual game on Mobile device.
Backend Server calls the GameLift API’s, and it has nothing to do with the actual gameplay. It just helps to set the game including matchmaking, requesting game sessions, etc.
Game Server is actual game server which will relay the actual game data. It has all the gaming logic.
2. It is best practice to not call AWS GameLift API’s directly from Mobile Device since there is no authentication mechanism provided by AWS GameLift. Instead, integrate GameLift API’s in backend server by which the request will only come from authenticated users.
3. Game Server creation and termination are decided by AWS GameLift FleetIQ ViabilityAlgorithm
4. Following are the parameters provided once the game session is created:
IP Address and Port (It’s IP of Game server on which the session is placed. The client will be connected to this IP and Port for gameplay.)
5. AWS GameLift Custom game servers supports following languages:
C++
C++ for Unreal Engines
C#
6. Game engines – Amazon Lumberyard, Unreal Engine, Unity, engines that support C++ or C# libraries
Realtime Servers are lightweight, ready-to-go game servers that are provided by GameLift for you to use with your multiplayer games. While many games need a custom game server to handle complex physics and computations, this is overkill for many other games. Since Realtime Servers eliminate the need to develop, test, and deploy a custom game server, choosing this solution can help minimize the time and effort required to complete your game.
1. There is no special realtime capability in Realtime servers. There is no latency advantage when used Realtime server compared with GameLift Custom Server.
2. Realtime Server Client SDK is used to communicate with Realtime Server on Client Device
3. Realtime Script can only be written in Node.js language.
4. AWS GameLift Realtime Script can be deployed on Spot Instances as well as On-Demand instances
5. Realtime Server Client SDK is only in C#. So game builds which are developed other than C# cannot user Realtime Server capability and will have to use GameLift Custom Server.
6. Realtime Server works only for Unity and engines that support C# libraries.
GameLift FleetIQ optimizes the use of low-cost Spot Instances for cloud-based game hosting with Amazon EC2. With GameLift FleetIQ, you can work directly with your hosting resources in Amazon EC2 and Auto Scaling while taking advantage of GameLift optimizations to deliver inexpensive, resilient game hosting for your players.
1. When using GameLift FleetIQ, you prepare to launch Amazon EC2 instances as usual: make an Amazon Machine Image (AMI) with your game server software, create an Amazon EC2 launch template, and define configuration settings for an Auto Scaling group. However, instead of creating an Auto Scaling group directly, you create a GameLift FleetIQ game server group with your Amazon EC2 and Auto Scaling resources and configuration.
2. By using FleetIQ, we get complete control to our EC2 instances. It can be seen in EC2 console, which is not in the case of Custom Servers and Realtime Servers. Both the above servers are managed by GameLift and are not accessible.
3. When new server is created by auto scaling group, it first needs to register itself to GameLift Service.
4. When the instance spawn up, it calls AWS SDK function RegisterGameServer(), which informs GameLift Service about the new instance. FleetIQ Viability Algorithm then keeps note of it and mark it as available. New game sessions can now be hosted on that Game Server.
5. Same goes while terminating the Instance. In order to gracefully terminate the instance, it needs to inform to GameLift Service that the instance will no longer be available to host new game sessions. For this, it calls DeregisterGameServer() function which deregisters it and make it unavailable to host new game sessions.
6. GameLift FleetIQ works best when it is constantly directing players onto instances that are least likely to have game session interruptions. Maintaining long-lived sessions interferes with the GameLift FleetIQ balancing process, which increases the likelihood that games sessions might be interrupted
As you may have got a brief idea on all the AWS GameLift offered services, and if you are looking to know more about how we can help you with GameTech solution on AWS for your game, reach out to us at sales@flentas.com
Client Server Interaction: https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api-interaction-vsd.html
Ebook (great read): https://pages.awscloud.com/GLOBAL-ln-IND-game-servers-2021-learn.html