[Solved] How can I allow users to log into MySQL database to retrieve saved state?

Hello GDevelopers!

I would like to save my users’ game state (global variables) in a MySQL database and allow them to log into their account (user/pass) to retrieve data and continue their saved game.

I’ve successfully followed a GDevelop tutorial using MySQL to save highscores to a database, but what I am trying to do now is more complex as it requires logging in/retrieving and parsing data.

Has anyone here done something like this with GDevelop and can share some knowledge on how to go about it?

Have a look at this web page, which appears to cover what you’re after.

That has been done multiple times, but I don’t think there are many up to date resources on it. If you want authentication and a database, I recommend trying Firebase, it has an integration built into GDevelop.

1 Like

As I said, I already followed the Highscore tutorial. What I am after involves getting data from the database into my game and users logging in.

An SQL database contains only data, it cannot communicate directly with GDevelop, it is up to you to code an API (a gateway to your database).
Again, i advise you reconsider using firebase instead. Authentication is a hard task, and in the worst case you can make the passwords of your players publicly available if you are not experienced. If you use firebase, no need to create an api, and you can get authentication made by google themselves, so as you can guess it is highly reliable.

Sounds like Firebase is the way to go. Thanks for the suggestion!