Illustration of a man using a PC. Dollar signs and arrows up suggest he is saving or making money.

Surviving and Thriving: Cost Management Tips for Multiplayer Games

Let’s get straight to the point – the past few years in the games industry have been brutal. Studios are closing left and right, and while there are moments of optimism, the struggle is real and ongoing.

At Code Wizards Group, we collaborate with studios of all sizes, and there’s one recurring theme: “How do we control the costs of our live service game?”

We thought we’d tackle this question head-on – to support others in these testing times – so we’ve compiled our top three aspects to consider, check, and optimise. These tips primarily focus on dedicated gameservers, an area where spending can notoriously spiral, but they can also be applied to any part of a game backend.

Before diving into the nitty-gritty, it’s crucial to understand your current expenses. We often distil it down to a single metric to measure the impact of any adjustments we make. Backend infrastructure is complex, and changes in one area can have ripple effects elsewhere. Savings in one area might lead to increased costs in another. That’s why we wrap everything into one easy-to-track number.

Our go-to high-level cost metric? Cost Per Player (CPP). Here’s how it breaks down:

total infrastructure cost for a month / peak number of players per month = Monthly Cost Per Player

Once you’ve got your Monthly CPP, the next logical question is, “What does good look like?” It’s a tough one, as every game is unique. Some rely heavily on dedicated game servers (typically FPS or fast-twitch games), while others only need a basic achievements service.

As a rough guide, for a Triple-A FPS with dedicated gameservers a typical Monthly CPP would be around $2. For a simpler game, with fewer requirements, it could be closer to $0.50 or less.

Of course, this varies wildly depending on the game. If you’re running dedicated server-side GPU LLM models to ensure your AI techno-dog army offers unique player challenges, costs could skyrocket.

Without further ado, here are our top three battle-tested strategies to keep your budget in check and your game running smoothly.

1) Check Your Environments for Excessive Cost

Multiple environments are essential for rapid iteration and testing, but they can also be a drain on your resources. Here’s how to tighten things up:

  • Downsize Instances: Use smaller instance sizes in development where load is lighter than in production.
  • Stack Environments: Combine environments where possible. For instance, merge Staging and QA environments if it won’t disrupt operations. We recently helped a client reduce the number of environments from 7 to 5, saving tens of thousands of dollars annually.
  • Automate Spin Up/Down: Automate the spin down of unused compute resources in development or QA environments. Turn off gameservers when not in use, or spin down API nodes during off-hours. Trust us, these savings add up.
  • Efficient Logging: Run logs at a reasonable verbosity and ensure log rotation is in place. Excessive logging can fill up storage and lead to unnecessary costs. Downsizing development environment disks is another way to save some cash.

2) Optimise, Optimise, Optimise (Did we mention ‘Optimise’?)

Your client and server codes are the next frontier for cost-saving. Here’s where you can make a real impact:

  • Map the Hot Path: Identify and streamline core routines between client and server. Focus on the ‘hot path’ to understand what’s being sent and received.
  • Cull Excess Calls: Reduce unnecessary API calls by caching frequently accessed data locally.
  • Eliminate Debug Events: Stop sending debug events to the server – they’re useful for development but wasteful in production.
  • Trim Replication: Remove needless replication that doesn’t contribute to critical server calculations or player experience.
  • Timing Updates: Optimize the timing of updates sent to the server. Only send what’s necessary, when it’s necessary.

3) Be Efficient with Dedicated Gameservers

Dedicated gameservers can be a serious drain on your budget. Here’s how to make sure they’re working for you:

  • Profile Your Servers: Stand up a single gameserver, run a playtest, and profile metrics like CPU, memory, and bandwidth. Repeat this for different game modes and server types to get a comprehensive understanding.
  • Instance Stacking: Stack as many servers as possible on a single machine. The more, the merrier – and cheaper!
  • Compute Sizing: Know whether your server is CPU or Memory (RAM) intensive. Choose your compute resources accordingly – high single-threaded clock speeds and more CPU cores for the former, heaps of RAM for the latter.
  • Maximise Player Density: Set your sights on 100% player density. For games with fluctuating player counts (like battle royales), ensure slots aren’t sitting idle. This is key for keeping costs in check.
  • Leverage SPOT Instances: Use SPOT instances from cloud providers. They’re cheaper but come with a caveat: the provider can yank them if needed. Use them for non-critical sessions like tutorials, but steer clear for live matches to prevent player frustration unless you have excellent metrics and monitoring to understand the impact.

By taking a hard look at your environments, optimising your code, and being smart about server usage, you’ll stretch your budget further than ever before.

Those are our Top 3 Tips, but because Code Wizards are all about value, here’s two more for free!

i. Balance Bare Metal and Cloud

We won’t dive deep into the merits of each here (there are a billion articles online about how and why). What we will say is – don’t be afraid to mix and match based on the workload.

Or if you’re feeling really fancy, investigate a hybrid model; just beware of the hidden management costs that bare metal compute can come with!

ii. Consolidate and Focus

We often see new games that aim to put gameservers in as many worldwide locations as possible. This is great – bring the latency down for players! But there is always a balance: spend vs. player experience (more locations means greater choice for the player, but more spend!).

We often find the best way to do this is to set a “Latency Target” or “Latency Tolerance”; the latency we are trying to achieve for players. You can test this locally by running a game client and server and using tools to add latency between the two. Keep incrementing this until the game becomes unplayable, then go back down a notch. This will give you your latency target. You can then map out data centres across the world to help you be as efficient as possible.

This is something you will need to constantly re-review. Typically, games will have a reduction in player base over time, which means that consolidation can actually help game communities, bringing player bases together and improving matchmaking times, whilst also saving you cost – win, win!

Ready to get serious about cost-cutting?

Dive into these strategies and watch your savings grow. By applying these strategies, you can significantly reduce the costs of developing and running multiplayer games. Remember – efficiency is key. Optimise where you can, and don’t be afraid to innovate to keep your game development budget in check.

Good luck out there #HugOps

Alternatively, you could Leave it to the Wizards and get in touch with me.

This article was originally published on LinkedIn by Tom Penrose.