Looking for a backend for social games

I am looking for advice about backends for PotatoJam’s games.

What exactly I am looking for:

  • A customizable solution for game backends.
  • It should support many games out of the box because I have many small games, so I would like to avoid creation and maintenance of a separate server for each one.
  • I need authorization (initial initialization by generated ID and then authorization using popular services based on OAuth).
  • The ability to create leaderboards and tournaments (leagues).
  • Save progress of the user.
  • Some shared storage for configs or replays (for asynchronous multiplayer).
  • I don’t need real-time multiplayer.

I’ve already checked a couple of services:

Playfab
We currently use this service. It’s pretty easy to use, but it doesn’t have all the functionality I need, e.g., leagues. Also, considering the nature of web games where a lot of people play your game, but LTV is very low, it’s hard to scale on such services when you pay for everything you add. We use just leaderboards for now and don’t want to use more functionality because we don’t want to be stuck with this service and a constantly growing paycheck. This kind of solution usually requires a much higher LTV to start making sense.

Nakama
It looks exactly like what I need and even more, but I didn’t find a way to manage a few games on one server.

Do you know any alternatives?

I thought maybe I should run a few instances of Nakama on the same server (one for the server and another for the DB) until I need to scale one of the games. But for now, I need it for 10-12 games, which feels like too much for one server. Maybe some other way to split games in one instance exist?

Another option would be writing our own solution using Node.js or something similar, using ready-to-use building blocks, but I would like to know what options exist before I go this way.

3 Likes

My first thought was Firebase, which I know you’re familiar with.
Except for the obvious problem of extension-firebase not having web support, does it lack any particular capability that you need?

Maybe Colyseus is an option? It seems to have integrations with Defold as well.

Yes, I think it’s an option, but I feel like it will have the same issue I mentioned:

This kind of solution usually requires a much higher LTV to start making sense.

That’s why I’m looking for something I can set up myself and have more control.
Talking about functionality, I think it should be possible to implement leagues using cloud functions, but I couldn’t find anything when I was looking for it.
By leagues, I mean Tiered Leagues - Heroic Labs Documentation

It’s not an issue, really. Client is much easier to implement, so it’s not a stopper, so I didn’t take it into consideration at all.

It’s kinda the opposite from what I need. There are many solutions for the real-time multiplayer and synchronization. But I need everything else but that:

  • Login
  • Get profile info
  • Get configs and maybe some updates
  • Get/Set rank in leadearboard
  • Post replay
    etc

So, I need just REST API part
Using Nakama as example, here is what I need:

Never tried either of them but looking at the pricing, it seems using Firebase or renting your own server (or VPS) and writing your own code in Node.js (using Express) is the most economical solution. In my country it’s quite cheap for a cloud VPS, just around 25usd/month

Amazon Gamesparks used to be one of the services that ticket most (all?) of your boxes, but it was shut down a few years ago and Amazon never presented an alternative. Amazon now recommend HeroicLabs, Beamble and Accelbyte. I’ve never heard of Beamble and Accelbyte, but maybe one of them is what you are looking for?

1 Like

Thank you, I’ll take a look.

So, Nakama is pretty unique in this sense? There is no other out-of-the-box solution that can be used on own servers?

Let me try to explain what I mean by this and why I would like to use a solution that I can set up on my own server.

During the last year, our games had about 100 million gameplays (I think it’s more because different platforms represent these statistics differently, but let’s use this number). This includes mobile and web (across a couple of portals). The average session lasts at least 10 minutes (again, hard to say for sure because of different approaches to measurement, but let’s use this number).
Let’s assume that each session finishes at least 3 levels.
So, one session requires:

  • an authorization request
  • and about 6 leaderboard requests
  • ideally, it would be nice to have 3 save progress requests and 1 load progress request at the beginning
    Maybe more, but let’s keep it like this.

100 million * (1+6+4) ~ 1.1 billion requests a year.
It sounds like a lot, but in reality, it’s about 40 requests a second, which is almost nothing, traffic-wise (just a few TB).

Now we can pick one of the services and calculate the estimated price:

1.1 billion / 1 million * 10 = $11,000 a year.
It doesn’t sound like that much for a big free-to-play (FTP) game. But as I mentioned, LTV isn’t that big as in FTP games, and this is a pretty noticeable percentage of our income. Also, I calculated very basic functionality. I would like to have much more. I can easily see how implementing new features could increase requests by a factor of five.

3 Likes

it’s $30 a day… too much for such simple features

If I understood correctly, these seem very basic to me. (if I were you)You can easily develop something by using https://www.slimframework.com/ (I’m using it for a global corporations every day) and run it on a Linode instance then you can scale it as you like… I think even Nakama is overkill for those things.

2 Likes

I think so too, that’s why I’m asking for options.

Yeah, I found where to host my server already.

Thank you, I’ll take a look.

1 Like

You can have multiple games on one Nakama instance, you just need to prefix your collections, leaderboards etc with the slug of your game. That’s how I’ve done it so far.

1 Like