How to save scores in database?

Hello guys! I’m making my first game :smiley: , but I want to export the score at my Google drive or little data base (SQL) to save the score of the 100 best players, how can I do that?

First of all, GDrive is your worst bet here.

You’ll need some sort of web hosting and basic knowledge of PHP (you can look up online tutorials for that). You’ll need webhost that gives you MySQL database. There are free hosts for that.

Then you’ll need to write script that, based on get/post requests will retrieve/put scores in database. Then you use GD’s capabilities to make web requests to this script. that way you can make hiscore list that way.

I wish I could help more or even give full php script, but I’m tired and don’t have much time. But this should give you basic idea of what you need to do.

Thanks for responding :smiley:. There is no problem with web hosting, but what I say is how to use the “events” to interact with the web data (SQL).
You mentioned online tutorials of GDP but the true is that the name is too general and when I search with google I found other game development as Unty, or Game Maker … is not easy :frowning:

You can use PHP with GD and so, interact with a database.

Yes, but I don’t know how to interact with a database with GD :frowning: . I know there is an option but don’t know what it is. I would thank a tutorial :unamused:

You can’t directly use database with GD.

You can, however do it with PHP script that does real work and sends queries to DB based on $_GET or $_POST variables.

So workflow isn’t
GD → database
but:
GD → PHP script → database.

You send HTTP requests to PHP script which does things to database. I don’t know how can I be more clear on this except writing actual script and making sample game, both of which, I don’t have time for.