Posted April 03, 2020 by notapixelstudio
#data-science #game-analytics #unity #godot #elasticsearch
So, people are finally playing your game, yay! …but soon you realize that receiving feedback is hard. It has always been, and it will probably always be. Comments are scarce, ratings are too opaque… how are you supposed to make your game better?
You have to keep looking for playtesters and observe them play, and you will do it for sure. But there’s another important thing you can do: Collect data from your game.
Players make lots of choices while playing. These choices/actions can be transformed into extremely valuable data for you: Which character did they choose? How much time did they spend on a level? How many times did they fail before completing the game? How many enemies did they kill? How many shots did they fire?
You can formulate many questions like these, derive the answers from the data inside your game, then use those insights to inform your design.
So… how can we, as penniless indie devs, collect this data?
Before running through data, let’s take a step back and present an example:
SuperStarfighter is a local multiplayer party game for 1 to 4 players, in which you play by dashing and shooting bombs with just one button. Controls are that simple to appeal to a broad audience, but mastering the game requires skill. Fine tuning is extremely important in a party game like this, because of the many different play styles and skill levels involved in targeting such a diverse user base.
After the initial release we realized that just a handful of users gave us feedback, and there was no sign that would improve anytime soon. So we decided to bring our game to a convention. It is a very good way to receive feedback, you meet a lot of people, and it’s a really cool and extremely fun experience …
Advanced techniques of gathering statistics in conventions
… but it could be very expensive! Too expensive for two spare time devs like us.
Thus, we decided to leverage the power of the Internet, and politely ask users to help us gather data from their play sessions.
In order to actually gather data, we use GameAnalytics (GA), a free analytics tool platform that allow you to setup a free account, which lets you collect anonymous data from your game. Even if it is principally focused on mobile gaming, GA gives you extremely easy-to-use and nice tools to get the most out of your data, without any hassle from the players’ side.
Important ask the player first! We use a disclaimer that pops up the first time you open the game (with the option to opt-out anytime).
The GA dashboard is really nice and gives you a great overview of what data you can collect, and how you can extract important info, along with interactive graphs.
You just have to add some code to your game, or use already available features for GA, according to your engine of choice (as explained in the Integration Guide in the GA docs – There is even a step-by-step integration guide for Unity if interested).
This would allow your game to send data to GA, along with an identification key they provided you when you registered.
GameAnalytics has different so-called types available for tracking different events in your game: user, business, resource, progression, design and error (check out here to know more).
We will focus on design events, since they can be customized to collect anything you want. To be as generic as possible, we will use the GA REST API, that allows you to send JSON data through the internet.
I’ll give you an example:
In SuperStarfighter there is an entire section in which you can personalize the games you want to play, selecting them from a map:
{"category": "design", "event_id": "selection:gamemode:{gamemode_name}"}
Where the field event_id is made with the following format: