Advice on querying a database for a multiplayer game


I’m working on a multiplayer mobile game. I want the game to be able to query a server database and get information like player high scores. I’ve seen guides where they use sqlite to save and modify a local database, I can’t find any good guides on setting something like this up over the internet.

Does anyone know of any good guides or have some examples I can look at?


This might be a start



Hi @Outis_V, Welcome to the Community!

Happy Coding!

You have a couple of options really.

  1. If you are just looking at highscores you could use a 3rd party service such as PlayFab. There are a few around. They tend to use a restful API but often have C# libraries for you to use.

  2. You could make your own web API running on your own website. Take a look at Restful API’s. Your website accesses the database and requests are made to your API. These calls will add values to your database or return a current list of highscores etc

For security reasons you don’t want to make your database completely open to the web (e.g using a connection string). You want to secure it behind an API so that only data that you expose via the API can be accessed/changed etc.

1 Like

I would also highly, highly recommend you look into PlayFab. It’s pretty sweet and does SO much heavy lifting.

1 Like