top of page

Making Your Game Multiplayer: A Guide to Backend Services

A key aspect of the game Tournament of Dragons (ToD) is that it is a multiplayer game. Only multiplayer, you can’t play solo. In fact, you always need to play against 3 other players, whether they're human, AIs or a mix of both. As the project progressed, it was time to select a Backend as a Service (BaaS) provider to integrate with.

To be clear, at Decisive we had little interest in developing this important piece of infrastructure ourselves. A quick search on Google showed a few options, so... why reinvent the wheel?

A search always starts with a list of requirements, and indeed this can make a provider top or bottom of the list, so let’s be clear about what we needed for ToD:

  • Data: We want to save some data about the player in a central server. For ToD this is limited to the player name, flag, shield color and type. Not a big ask here, and to be fair, this could be easily saved in the player’s device as well. Still, being able to save data is certainly useful for this and future games we are planning to make.

  • Leaderboard: Every player is on the board with a position and a number of points. Every game affects the points and thus the position. In a way, it is simple: as single, global leaderboard.

  • Matchmaking: The leaderboard helps a lot here, because we want players to play against other players of similar skill levels. The reason why I don’t play Fortnite is because I get killed within 10 seconds of landing… yes, you laugh but it is not fun. But, when I play ‘playground’ mode with friends, it is a lot of fun. So, we want players that are +/- a small number of points, and we want games to start fast, say in about 10 seconds.

  • Multiplayer: ToD is a four player game, so every player needs to know what the others are doing. ToD in particular has two phases, one is turn based, the other is simultaneous play. So we want real-time multiplayer capabilities from the BaaS. We could get away with just turn based multiplayer but future games won’t have that luxury so might as well select a provider that supports realtime from the start.

These requirements are basically what you need for a ‘Clash Royale’ type of game. This is a specific type of game with requirements from the BaaS that are sometimes easy and sometimes hard to fulfill.

Now, here’s a twist: we have artificial players. Artificial players are just like human players as far as the BaaS is concerned: They have data, they have a position in the leaderboard, if they win they go up, if they lose they go down, they should only play with players of similar skills, etc. We did not expect BaaS providers to ‘support’ artificial players, but then there isn’t a lot they need to do, for the most part if they provide certain flexibility, that would do. So we wanted a custom player field to flag certain players as artificial, and to have the matchmaking prioritize human players (they are impatient), things like that.

With this in mind, here’s what I found from the following providers:

Amazon GameOn

This Amazon service seems centered on facilitating tournaments that have Amazon merchandise as prizes. This can be cool, but not what we are looking for. The leaderboards do not seem to work the way we want: global and cumulative (rather than a high score table), plus it is not clear that matchmaking and multiplayer is part of their offering.

PlayFab

This service looked quite promising. Acquired by Microsoft, a quick feature review ticked all the boxes. The data, leaderboard and matchmaking seem to be what we need. But after reading more about multiplayer, there was some disappointment. The documentation involves deploying servers in Azure. We’d rather not. We prefer to be given a service, not a piece of software that we need to deploy and manage. Big difference.

Shephertz AppWarp

I left this one on the list as an example of many others that simply fail to provide a credible website. To begin with, they are all over the place: banking, insurance, travel, BaaS for video games… then the features are truly ambitious: they seem to have it all and more, but then there is lack of specifics or documentation. Researching on a BaaS provider is work, it takes time. There are many of them so those that don’t pass the ‘website credibility’ are left out.

Game Sparks

This looked like a winner: bought by Amazon with a wide offering of services that cover all our requirements. After some more digging, the perception of finally finding a BaaS provider solidified.

We spent a month integrating with their API. There is a steep learning curve that I don’t wish to even climate-change deniers. In the end, I actually got quite a bit done and working (after a big effort). Even a simple thing, like getting the data of a player seemed very hard, involving complex MongoDB configuration, javascript coding on their server, and plenty of trial and error.

Still, better sweat with a hard integration than having to deal with our own server… so we persisted.

In the meantime, something quite bizarre happened. We reached out to the sales people of Game Sparks so we could get pricing, sign a contract and finalize the commercials. They would not get back to us. As the integration time and effort grew, we were growing nervous because it looked as if nobody cared on the other side.

Eventually after a month of dealing with a system that makes simple things hard and hard things nightmares, we gave up. We just did not want to further invest if we can’t become customers of this service. Funnily enough, someone eventually replied but by then it was too late - if they take months to answer a sales call, which involves taking money, imagine a support call! We would be fully dependant on their service, so we needed a trustworthy partner on the other side.

Brain Cloud

Another service with a lot of promise. And, even better, they were responsive and friendly. By far, the fastest company to answer our queries, and they seemed happy to engage with a small game developer like us.

It was worth it then to dig deeper into the documentation and start integrating. Everything looked good until we got to multiplayer: Realtime multiplayer is not supported. That’s it, just not part of the current features. Too bad!

To be fair with many of these BaaS providers, they are tackling a hard problem: all these services like Data, Leaderboard, Matchmaking, etc. will have very different requirements depending on the game. Providers that want to accommodate to a large section of the industry have a very hard time implementing the flexibility needed.

But for us, who just want support for a ‘Clash Royale’ type of game, all the complexity that comes from the flexibility adds to time and cost. This, combined with the extra requirement of support for Artificial Players led us to start developing our own backend.

There is a big advantage to being able to run artificial players directly in the server, then use the games played by these artificial players to train them further. Human players learn from each game they play, so artificial players should be able to do the same.

We have been working now for a couple of months on this backend, and keep finding more advantages when it comes to having an ‘AI-aware’ backend. Take matchmaking for example: yes, the service will prioritize humans, matching them for a game above artificial players (AI players don’t have feelings, so they don’t mind), but then it will invite artificial players to a game that is needing players.

This is great: you will always have players for your game, no matter your skill or time of day. And you will have good players (no dumb AIs that always do the same thing). And all this in a short window of time! No more waiting minutes to get a multiplayer game going, you can start in 10 seconds.

As we launch ToD with this awesome AI-aware backend, we’ll learn more and we’ll be back with more info about the combo of having intelligent, learning artificial players and a backend that supports them.


bottom of page