AWS for Games Blog

How to host your Unreal Engine game for under $1 per player with Amazon GameLift

Introduction

Game developers constantly seek innovative ways to create more interactive multiplayer experiences. However, with increasing player expectations, rising game production costs, and growing competition, studios face the challenge of balancing game performance and profitability. Game developers from studios of various sizes tell us that reducing operational costs without compromising player experiences is a top priority for 2023 and beyond.

A good place to start is by evaluating your game tech operation expenditures. According to Omdia, an independent game tech analyst firm, operations will account for approximately 19% of a studio’s total tech expenditures in 2023 and rise to nearly 25% by 2027. Game servers, along with compute and data storage, make up the vast majority, nearly 60%, of these operational expenditures.

Figure 3: Operations as a share of games tech spending and total games market revenue.

Amazon GameLift from Amazon Web Service (AWS) is a fully managed service that helps developers manage and scale dedicated game servers for multiplayer games while decreasing server compute costs by up to 70% compared to existing on-premises deployments. However, customers can find even more savings by leveraging best-practice configuration strategies when setting up their GameLift servers instances. In this blog post, we share three cost-saving techniques we recommend to our customers and explain how these can result in an estimated $1 per-player per-month hosting cost, without compromising game performance or player experience.

Pricing overview

First, let’s define what type of game we use as our example and what inputs make up the per-player cost calculation. For this blog post, we use a multiplayer game built on Unreal Engine as our example. Multiplayer games built on Unreal are an accurate representation of the types of games hosted on Amazon GameLift and provide historical data to reference for our cost estimates.

Next, let’s cover how we estimate Amazon GameLift hosting costs. We leverage the AWS Pricing Calculator for Amazon GameLift to dynamically calculate estimated monthly hosting costs based on game-specific configurations. For this exercise, we estimate GameLift hosting costs in the calculator, which includes the fully managed server hosting with player matchmaking.

Finally, it’s worth noting that the GameLift pricing calculator, and the price per-player estimates used in this blog, do not take into account any additional cost savings that may be available to customers through AWS discounts or credits.

Now, on to optimizing our instance costs.

GameLift instance costs

GameLift instance costs are the costs associated with the compute resources you need to host your game, specifically the number of concurrent users (CCU) your game servers need to support. Amazon GameLift dynamically scales capacity in response to game server activity. As players arrive and start game sessions, GameLift auto scaling adds more instances; as player demand wanes, auto scaling terminates unneeded instances. Auto scaling and per-second billing allows GameLift customers to focus on building games instead of trying to predict game server capacity needed to support fluctuating player demand.

There are many decisions to make when configuring your GameLift instances, but three in particular have an outsized influence on hosting costs—operating system choice, use of AWS Spot Instances, and selection of instance type.

Operating system

Amazon GameLift supports game servers that run on Windows Server 2016, Amazon Linux 2, and most recently, Amazon Linux 2023. Windows operating systems include an additional licensing cost, which can increase your instance costs by almost 2x over comparable Linux servers. These cost savings make the Linux server operating system a good choice for most GameLift customers.

On-Demand Instances

Linux

Windows

Savings

c4.large

$0.127

$0.237

46%

c4.xlarge

$0.246

$0.466

47%

c4.2xlarge

$0.484

$0.926

48%

c4.4xlarge

$0.962

$1.845

48%

c4.8xlarge

$1.916

$3.716

48%

 

On-Demand instance pricing taken from Amazon GameLift Pricing page as of August 31, 2023

AWS Spot usage

Defining a target percentage of AWS Spot usage across your fleet is a key way to save costs. Spot instances offer customers access to spare AWS computing capacity at savings of between 50% to 85% compared to on-demand prices. With Spot Instances, you pay the Spot price that’s in effect for the time period your instances are running. Spot Instance prices are set by Amazon EC2 and adjust gradually based on long-term trends in supply and demand for Spot Instance capacity. Amazon GameLift uses a proprietary algorithm to place new sessions on game servers based on player latencies, instance prices, and Spot interruption rates to help increase cost savings while maintaining high game server availability. Spot instances are not guaranteed and can be interrupted, but by using game session queues and instance diversification, Amazon GameLift customers, including Behaviour Interactive, find Spot instances both cost effective and reliable. This makes targeting 60% usage a reasonably conservative approach to leveraging Spot instances.

Linux Instances

Spot

On-Demand

Savings

c4.large

$0.04296

$0.127

66%

c4.xlarge

$0.0882

$0.246

64%

c4.2xlarge

$0.18108

$0.484

63%

c4.4xlarge

$0.3642

$0.962

62%

c4.8xlarge

$0.7272

$1.916

62%

Linux Spot and Linux On-Demand instance pricing taken from Amazon GameLift Pricing page as of August 31, 2023

Instance types

Amazon GameLift supports 68 instance families across 23 regions. For our hypothetical Unreal game, we’ve been comparing c4 instances, where the “c” stands for compute-optimized instances that are designed for compute-intensive workloads, or for our purposes, dedicated game servers. c4 is the 4th generation of this instance family.

Amazon GameLift now supports instances powered by AWS Graviton3 processors, including c7g, where the “g” stands for AWS Graviton, which enables optimal price-performance for compute-intensive gaming workloads. AWS Graviton processors are custom designed by AWS using 64-bit Arm Neoverse cores. The 3rd generation, Graviton3 processors, deliver up to 25 percent higher performance, up to 2x higher floating-point performance, and 50 percent faster memory access based on leading-edge DDR5 memory technology compared with Graviton2 processors. Further, c7g instances are ideal for all Linux-based workloads written in popular programming languages, such C++, C#, and C, and for Unreal Engine-based game servers.

Graviton support is one of the top requests from GameLift customers looking to further optimize their game hosting costs. AWS customers already using Graviton-based instances, such as Epic Games, have seen the benefits firsthand. “As we look to the future and building increasingly immersive and compelling experiences for players, we are excited to use AWS Graviton3-based EC2 c7g instances. Our testing has shown they are suitable for even the most demanding latency sensitive workloads while providing significant price-performance benefits and expanding what is possible within Fortnite and any Unreal Engine created experience,” noted Mark Imbriaco, Epic Games Senior Director of Engineering.

Linux On-Demand Instances

c7g

c4

Savings

Large

$0.094

$0.127

26%

xlarge

$0.180

$0.246

27%

2xlarge

$0.354

$0.484

27%

4xlarge

$0.701

$0.962

27%

8xlarge

$1.394

$1.916

27%

Linux On-Demand instance pricing taken from Amazon GameLift Pricing page as of August 31, 2023

Total instance costs

Changes to any of these three GameLift configurations can have a meaningful impact on your game server hosting costs. When taken together, these three recommendations can lead to significant cost savings, up to 80% when compared to the alternative. And perhaps even better news, choosing Linux as your operating system and Graviton as your instance type can actually increase the performance and stability of your game servers.

Instances

Linux, Spot, c7g

Windows, OD, c4

Total Savings

Large

$0.0462

$0.237

81%

xlarge

$0.0918

$0.466

80%

2xlarge

$0.17784

$0.926

81%

4xlarge

$0.3606

$1.845

80%

8xlarge

$0.73464

$3.716

80%

All instance pricing taken from Amazon GameLift Pricing page as of August 31, 2023

GameLift bandwidth costs

Bandwidth costs are captured under data transfer out (DTO), or the costs associated with transferring data from Amazon GameLift to the internet (learn more about AWS DTO charges). DTO charges can be an area of uncertainty for game developers and are often overlooked during configuration.

Because DTO requirements are unique to each game, we can’t give specific recommendations as to how to configure your game’s bandwidth needs, but we can look at historical usage across GameLift customers using Unreal Engine. For these customers, average DTO usage as a percentage of total GameLift monthly hosting costs varied, but just to be on the safe side, we’ll assume DTO represents 20% of the total GameLift costs for our Unreal game.

Bringing it together

We can now plug in the prior recommendations as inputs into the AWS Pricing Calculator for Amazon GameLift and estimate a total monthly hosting cost, which can then be divided by our expected number of peak monthly players (peak CCU) to get to a monthly per player hosting cost. We assume 100,000 as our peak CCU for our example Unreal game, but any peak CCU you choose will give you a similar per-player estimate.

Other inputs we used in our estimate are as follows: average CCU equals 50% of peak, 16 game sessions per instance, 8 players per game session, 10% idle buffer, and DTO representing 20% of total costs. This comes to a total monthly Amazon GameLift cost of $81,396.67, or $0.81 per player per month. There are some benefits as your peak CCU rises, as the same prior inputs with 10,000 peak CCU comes to $0.87 per player, or with 1 million peak CCU comes to $0.78. But either way, you are well under the $1 per player threshold.

Cost Details (Monthly)

10K CCU

100K CCU

1M CCU

Upfront

$0.00

$0.00

$0.00

Instance (c7g.2xlarge)

$6,436.55

$64,365.67

$643,654.69

Bandwidth (DTO)

$2,285.00

$17,031.20

$135,291.20

Total Hosting Costs

$8,721.55

$81,396.67­­­­­­­

$778,945.89

Per Player Hosting Costs

$0.87

$0.81

$0.78

Total and per player hosting costs recently estimated using the AWS Pricing Calculator for Amazon GameLift

We dove deep into three of the most significant Amazon GameLift cost optimization recommendations, but there are others worth noting. These include:

Conclusion

Amazon GameLift gives developers a lot of control over how they customize the service to meet their games’ needs. And as we’ve described, configuration choices can have a big impact on your per-player hosting costs. Leveraging Linux servers, Spot instances, and Graviton3 processors can significantly reduce your GameLift hosting costs right out of the gate. Ultimately, developers make decisions about where to host their games sometimes years before actual launch, which makes flexibility and the ability to optimize costs critically important. There are no guarantees when it comes to launching a game, but following the recommendations provided here is a good place to start if you want to host your next multiplayer hit for under $1 per player.