A
A
Andrey2020-01-04 06:07:17
MySQL
Andrey, 2020-01-04 06:07:17

What is the best way to save game progress in MySql?

Hello everybody! I have a game prototype ready and now it's a question of saving game progress. I want to store all the players in a MySQL database, where I store tables with accounts and the characters themselves. The question is different, also in the game there are about 50 different levels, and the levels are also divided into difficulties (easy, medium, difficult), how can I save such progress in the database? Do I need to enter each level in a separate line in the table (for example, the Levels table)?? But then I will have about 50 lines per player, but what if there are thousands of players? Maybe you can somehow save all the levels in one line? (Yes, you can make 50 columns in one line, but I'm not sure if this is correct ...) The same question applies to the character's inventory, for each character I have 40 slot cells in the bag, how can I save it, each slot in a separate line in the table (Inventory) or can I somehow store one array ??? Or maybe next to the database you can store some file that carries all the information (such as a save file), and in the database just make a link to this file in the table? In general, I ask for help on how best to save such a volume of information using the database, thank you all, Happy New Year to everyone !!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Korotenko, 2020-01-04
@AkaruZ

The unit has a great opportunity to serialize objects.
Create a GameState object and serialize it either in the text field or in the blob
https://docs.microsoft.com/en-us/dotnet/standard/s...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question