• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GML MySQL table and data download

Vallo92

Member
Hi everyone,
I have a problem in the interaction between the data of a MySQL and GM table, and I would like to ask you experts for a solution.
I am creating a game for mobile, and to make the data more important not editable by the player, I decided to save them and download them (when it is necessary) on a MySQL online database.
I have a MySQL table containing a list of objects, and all its associated data. I'll give you a simple example:

Code:
+-------+-----+-----+---------+------+
|  Obj  | Atk | Def | Element | Gold |
+-------+-----+-----+---------+------+
| Sword |   5 |   5 | Fire    |   10 |
| Bow   |   4 |   1 | Air     |    4 |
| Axe   |   6 |   5 | Water   |   15 |
+-------+-----+-----+---------+------+
Usually I have always used "http_get" to receive individual data, but in my case I need to download the entire table (which contains a lot of data), and save it in the game.
Can you tell me how can I do?
Having a look online I discovered the possibility of using json files (so print a json file via php and download it via GM), but I don't have a clear idea of how to use it. specifically I don't know how to properly organize a large amount of data to recreate on GM the exact same table as the previous MySQL database.

I hope I could explain myself well, despite my bad English.

Thank you!
 
Top