In the previous articles, we discussed the benefits of server authoritative design, and minimizing network and hardware IO to enable your game to scale effectively to many millions of players. Now, let’s take a look at how you make sure you’ve done all of that correctly. It’s test time!
Test under load
The only way to know if your game will successfully scale to millions of players, is to test your game with millions of players.
That doesn’t mean that every game published by every developer needs to have a QA team of several million people. Even if you could afford them, some games will never achieve millions of dedicated players, so testing at this scale would be a time consuming and ultimately futile exercise.
But you should certainly have some idea of the volume of players you expect your game to achieve. Make a best-case estimate. Then double or triple it. Write a load-test that simulates that number of players, performing a realistic workload on the server. By realistic, I mean the same types of requests, at the same frequency, with data similar to that a real player would actually send.
How to write that load-test is obviously highly dependent on exactly what your game does – no two games will function exactly alike, so no two load-tests will be alike either.
But however you do it, you need to be sure that the cloud code you have written, the database queries you make, etc. will continue to perform when your expected load is actually applied. Load-testing is not just the best way to guarantee this – it is the only way to guarantee this. If you genuinely expect your game to have millions of players within the first few days, get in touch with us here at GameSparks so we can discuss how we can help to load-test your game, giving us all an idea of where any bottlenecks are likely to be. You never know, we might be able to advise on ways to utilize the GameSparks platform in more efficient ways that you haven’t thought of yet.
To summarize what we’ve learned so far, and to ensure that your code will scale to support massive numbers of players:
- Prepare as much as possible (ability to turn features on/off quickly)
- Test as much as possible (perform a realistic load-test before launch)
- Talk as little as possible (minimize data sent between client/server)
- Do as little as possible (minimize data retrieved/saved on the server)
Follow these guidelines, and when your game launches, you shouldn’t have any problems supporting as many players as you need. Good luck, and happy coding!