Microsoft Game Dev Blog
Why should a single player game have a backend?
I recently talked to an indie developer. They had closed a successful Kickstarter, were moving quickly in production and were approaching a Closed Beta very fast. For the next year, their plan was to incorporate feedback and polish the game.
I asked them:
How do you collect feedback and telemetry, so you know what is going on? You will need that data to make sensible decisions?
I was very surprised by the answer:
We'll be using Steam Achievements. This way, we can track what the players did.
From what they said, you might already sense why you might need a backend:
You should have telemetry data and an analytics dashboard so you always know what's going on in your game.
But there's more to it than that! In the rest of this article, I explain why Telemetry & Analytics are so important, what other reasons there may be for any game to have a backend and how you can use LiveOps to extend the lifespan of your game and re-engage players. The good news is that I will also show you how Azure PlayFab can help you with all these topics, so you can concentrate on making a great game!
But first, let's start by defining some of the terminology:
What is a Backend?
As the name implies, it is the "back end" of your game. In software development this essentially means background services. Most of the time, this refers to online services.
If you think about it, you already have a backend integration if you integrate with Xbox or any other store.
Most of the time, a game will use one or more backends, connecting to them via an HTTP API by sending an HTTP request to the service, and receiving a response back, often with a payload represented in JSON or another ubiquitous format.
The response and payload can then be used in your game.
Backend providers usually wrap this functionality in a SDK to make it easy for you to consume the backend in your game. We do this with our backend platform PlayFab and provide SDKs for major game engines like Unreal and Unity, as well as multiple programming languages and frameworks.
Reasons why you should have a Backend in any Game
Now let's walk through some of the reasons why you should have a backend:
Telemetry & Analytics
The most important reason you should invest in a backend is to know what is happening in your game. This can be important even during development, whether it is to help the development team understand their own investment in time and features, or to provide metrics for external partners or potential investors in your project. There are always going to be a multitude of things that are of interest to you, either as a game developer or for conversations with potential publishers or investment partners.
Think of implementing telemetry and analytics as simply asking your game questions! The questions you come up with will need to be answered by your analytics solution, But for the analytics solution to be able to answer your question, you need to gather and feed it telemetry.
Data flow for Analytics & Telemetry
There are common questions you should be able to answer for your game: * Which errors occur? * Which UI elements, maps, features etc. are being used? * How are these used? * What is not used at all? * Where do players stop playing? * How often do players play? * How long is a play session? * Where are your players? * Who are your players? (cultural backgrounds etc.)
As you can see, Telemetry & Analytics is foundational. It is the basis to make any objective decision whatsoever - without recording data and asking the right questions you cannot make great business decisions.
Unfortunately, Telemetry & Analytics are often an afterthought, particularly for first time game makers. Many developers only start implementing this functionality after the game is live in some form.
But building in telemetry is something you should be doing from the start! So make sure to choose a very simple way to collect data and get yourself into the habit of gathering telemetry. Perhaps you can even make it a requirement for every new feature!
Finally, you need to also look at the data! There are some very large game developers that collect massive amounts of data, but never look at it. These teams could be a lot more successful if they took the time to ask questions and then answer them using the data being collected. Companies like Zynga, Miniclip and King grew to be so successful so fast not just because of the market they were in, but also because they put more effort into analysing and optimising their games than anyone else.
- Make it easy to collect telemetry
- Start collecting with the start of the project
- Make it easy to analyse collected data
- Make it a requirement for a new feature:
- Ask a question
- Collect telemetry
- Define analytics
Implementing Telemetry & Analytics in PlayFab
Because Telemetry & Analytics is so important, we have integrated this into every feature in Azure PlayFab.
In PlayFab, there are Telemetry events and PlayStream events.
PlayStream events are actionable, thus you can react upon them with Rules and execute Actions on them occurring. They will then be ingested into PlayFab's Insights, where you can then use PlayFab's built-in analytics features, or export them into other System like Azure Synapse Analytics or Azure Databricks for even deeper analysis by your Data Scientists. While there are many pre-built events, you can also create your own. Creating and sending a custom event is just a couple lines of code:
PlayFab Telemetry Events bypass the PlayStream and go directly to the Insights store. This is particularly useful if you have no need on acting upon them within the game, but only use them for analytics purposes.
Live Ops & Development Agility
During development of a game - and even after release - you want to be able to tweak balancing values, add new items and change existing ones. You also want to be able to contact your players, informing them of changes or challenges you have added to keep them engaged.
Keeping players engaged is one of the most important things you can do to maximise the lifetime and return of investment for your game. You don't want to be the game that has a huge peak when it launches, and then drops to almost nothing after a couple of months!
But what are the changes you should make, and how do you know the right path forward? Another integral tool is the ability to experiment. With PlayFab, you can easily perform multi-variant testing of new features to see what your players like the most or works best for your particular goals.
Implementing Live Ops in PlayFab
PlayFab offers a whole host of options to store data and update it - from a game-wide store (Title Data), to inventories for a Player or it's characters to specific Player Data which can be per game or even across games of the same Publisher!
There are many more use-cases and options specifically for players (see marked tabs above).
Engaging with Players
With PlayFab's Engagement feature-set, you have many options to engage with your players:
With Title News, you can set up title news, complete with localisation and payload to be published at specific times. With our SDK, you can then pull the news and display them in your game - for example in the game's main menu.
If you want to contact your players with other means, you can do so via Email Templates:
Push Notification Templates
Push Notification Templates allow you to send Push Notifications to you player's mobile devices:
Push Notification Templates
Segmentation is the process of dividing your players into sub-groups. This is important, because it means you can perform specific actions on a defined group of players.
One example would be players who are no longer playing your game - lapsed players - who you would like to email and motivate them to return to the game. For instance, you could decide to grant them a welcome-back gift.
A great segmentation tool can do the segmentation automatically. However, to be able to segment, you need data on your game and players which the segmentation tool also has access too. PlayFab is a strong choice here, because you can use segments to experiment, showing different segments different variations of a new/re-worked feature!
Here are few more ideas on how you can use segmentation:
- Most playing
- Highest spender
- Gift rewards for returning players
- Act on churning players
- Act before players are churning
- Keep a segment for special attention players
- Potential cheaters
- Experiment on segments (see above)
- Separate stores for segments
Implementing Segments in PlayFab
In PlayFab, you can easily define segments using the UI-based editor, which enables you to specify the conditions players need to meet in order to be moved into a segment.
Edit a segment
You can then use Rules to react upon these, e.g. by granting an item or execute backend code with CloudScript Functions or send a Push Notification as discussed above!
In the example shown able, players who have not logged in for a certain period of time are being granted an in-game item.
Have a look at the PlayFab Segmentation documentation to learn how you can leverage this feature!
In this article, we explored many reasons why a single player game should have a backend - and how Azure PlayFab supports you with ready-made services.
If you haven't already, start building with PlayFab for free now - and get the insights needed to make the right decisions and keep your players engaged for a long time!
From the Microsoft Game Dev blog
Creating for everyone: How to make more accessible games
Sarah Bond shares at the Microsoft Ability Summit why accessibility in gaming is so critical
Forza Horizon 5 crosses the finish line, fueled by AKS
FH5 relies on autoscaling Azure Kubernetes Service (AKS) clusters to meet the most challenging performance demands.
Lana Lux: Twitch Live-Coder and Creator of Strain
Meet Lana Lux, a game developer, designer, Twitch streamer and invested in an accessible, supportive community