Good day! The question arose how best to store the card in an online game (90 sectors for each player, with a unique status for each sector) in the MySQL database. Thank you in advance!
Solution: store the serialized array. Thanks to all!
Good day! The question arose how best to store the card in an online game (90 sectors for each player, with a unique status for each sector) in the MySQL database. Thank you in advance!
Solution: store the serialized array. Thanks to all!
I propose to store the map array in serialized form
It seems to me if the card is static - then there is no sense in storing it in a player (if the game is online and multiplayer), if each player has his own card, then this is contrary to sound logic. I can assume that it is not the map that is stored, but certain objects on it, identifiers of completed tasks ...
I would keep the card in 1 place and depending on the actions of the players update it.
Source: https://ru.stackoverflow.com/questions/141829/
All Articles
BLOB.
at onceBLOB.
- Costantino Rupertint
and store them for each player. - Although, in general, the correct and universal approach, here, of course, is to store a serializedBLOB
and carry out apack-unpack
when changes are necessary. Everything else smacks ofpremature optimization
. - Costantino Rupert