This Apress imprint is published by the registered company APress Media, LLC, part of Springer Nature.
The registered company address is: 1 New York Plaza, New York, NY 10004, U.S.A.
To my wife and our three sons, for all the love, joy, and fun.
In recent years, with advances to networks and the cloud, massive backend support has become essential to all successful games. Having backend features enriches players’ game experiences and gives your games a competitive advantage.
A typical example is support for multiplayer mode, which allows people to play with each other in the same game session at the same time. Even from far away, the network infrastructure makes this possible. A game stands out from the crowd immediately when it supports multiplayer mode.
Another classic question that game makers face is how to motivate players to play their game longer. One answer is by utilizing backend services. For example, you can implement a leaderboard for players to compete for the best place. Or, you can let players buy game items from a catalog. These are popular ways to engage players to stay with your game. And by the way, they also allow game creators to earn real money.
Further, many people publish their games, yet know nothing about how people experience them. Is there some level in the game that is impossible to accomplish? When do most players give up on your game? Insight into your players' behaviors helps you improve your game immensely.
For all of this, you need a backend infrastructure. You need servers to synchronize the world state among players in multiplayer mode. You need advanced analytics to gather, store, and evaluate game data and get insights into the players’ behavior. You need to store catalogs, items, and statistics. You need networks, databases, storage, servers, and the cloud. These are all typical topics you have to deal with as a game developer.
The cloud and the backend infrastructure is a very complex topic. It’s hard to find a good place to start. This book breaks this topic down and focuses only on the aspects relevant to gaming. Games have specific requirements, which differ from web applications, for example.
Through easy and practical examples, this book gives you a comprehensive guide on how to implement the most important backend features for your game.
You learn two ways to implement the backend. One is when you choose a traditional cloud provider; the other is when you are less interested in the backend and want a quick solution, using a Game Backend-as-a-Service (GBaaS) provider. Regardless of the method you choose, this book helps you understand the concepts and gives you step-by-step instructions.
You will learn about backend features, for example, what a virtual economy is and how game analytics help elucidate player behavior. You can use the provided source code to experiment and see how the concepts work in reality.
When you finish this book, you will be able to implement backend features into your game. For example, you’ll be able to enable multiplayer mode or create an economy to monetize your game. There are also many other exciting features covered here that can bring your game to another level.
During the last 15 years, I developed infrastructures for many applications. I started my cloud journey with IBM Cloud, then Amazon WebServices (AWS) and Azure. I consulted clients, technical teams, and management, helping them to achieve their goals.
Years ago, when I started developing games, I realized that the game developer community did not have enough guides to incorporate backend services for games. So I decided to support the community and, using my background as an Azure architect, I helped game developers get started with backend. I also started blogging (https://www.gamebackend.dev/) and engaged with the community.
I learned that game development is not easy. You need to learn a lot. This book aims to be part of this learning process by teaching you about implementing backend features, which are essential elements of modern games.
You will learn new and worthy skills. Tutorials and step-by-step instructions will guide you so you can implement sophisticated backend features.
It will save you time and money. It is a comprehensive guide covering all of the most relevant information and will help you quick-start implementing game backends.
It resolves uncertainty. It shows you where to start with certain backend topics and guide you through complex subjects in a simple way.
It is practical. You can execute the source code in your environment and see right away how each feature works and contributes to your game.
It is to the point. The product documentation is often overwhelming. The book focuses only on the main properties of each feature and describes practical steps.
You can stand out from the crowd. A lot of games do not use backend features. Your game has a competitive advantage over others when you incorporate backend services.
You learn that implementing the backend can be fun. It’s enjoyable to create a game that uses advanced features.
Chapter 1, Getting Started. You start by setting up the environment and creating a simple game in Unity. Then, you’ll extend this to a local multiplayer game. You will also enable online multiplayer game mode, which requires backend support.
Chapter 2, Player Authentication. In this chapter, you learn how to determine the player’s identity and implement player authentication in different ways. This is a key feature, as only authenticated players can use other backend functions.
Chapter 3, Dedicated Game Servers. You will build and use scalable backend infrastructures to run online multiplayer game servers.
Chapter 4, Matchmaking. You will use and implement an automated process to bring players together in one multiplayer game session.
Chapter 5, Leaderboards. In this chapter, you build leaderboards to store information like the highest scores achieved. This contributes to the competition among players and encourages player engagement.
Chapter 6, Economy. You will build a virtual economy that allows players to purchase items using real or virtual currencies.
Chapter 7, Game Analytics. In this chapter, you will investigate and implement ways to get insights into players’ behavior and gather specific events so that you can optimize your games.
Chapter 8, Party, Chat, AI. You will implement in-game player communication and use cognitive services to process the messages in order to improve your players’ experience.
Chapter 9, CloudScript and Azure Functions. You will investigate how to develop server-side logic so that you can implement all kinds of custom backend features.
This book uses the GBaaS provider Microsoft’s Azure PlayFab and pure Azure services. These products are mature enough for implementing a game backend for games of any size.
PlayFab claims to host over 2.5 billion player accounts in over 5,000 games. Azure is the second largest cloud provider in the world. Microsoft heavily invests in the game industry, so you can assume the ecosystem will grow even more.
However, you can use other GBaaS and cloud providers as well. Cloud services are very similar and conceptually there should not be any difference. The book uses reference architectures and considers best practices.
This book is primarily for game developers who may be skilled in game development, but possess little to no skills in GBaaS and cloud computing. This book is also for professionals working in the cloud solutions space who want to learn about the specific challenges in the gaming domain.
All of the source code from this book is available on GitHub at:
After reading this book, you will understand the most important game backend functionalities—player authentication, enabling multiplayer games, matchmaking, buying items and creating virtual economies, leaderboards, chatrooms, and game analytics, as well as any other custom features you want to implement with the help of cloud scripts.
You will know their basic building blocks, how to implement them, and how to integrate them into your game. With those, you will learn a worthy skill and be able to bring your future games to the next level.
Every day, hundreds and thousands of new games are published. The best ones have integrated backends. Yours should not be left behind.
Let’s get started. Read, learn, and implement. Have fun!
is a software engineer and architect at Microsoft. He holds a master’s degree in software engineering from the University of Oxford. Before joining Microsoft, he was honored with the Microsoft MVP and Intel Black Belt Developer awards.