I've checked most of the question that was display regarding my title but they were not related to what i am looking for, so i am starting my own question.
The game i am trying to re-create as an online game is called Buraco not sure if most or any of you know of it.
I already have the basic functions of my game such as:
- shuffle the deck of cards
- distribute the cards
What i am stuck at the momment is how should i deal with the the cards that were assigned to player A, B, C, D, cards left on the deck, cards on the trash and the cards that will be on the table by both teams if played by 4 players or by each player if played by 2 players.
Considering i do not wish any player cheating the game i would have to save each assigned card in a database so i what thinking how should i create my MySQL table to fit this ?
First thing that came to my mind was to create a table with the game session and all cards as a column but hey 104 cards total of column ??? there might be a lot of other better ways to acomplish this.
Then it came to my mind that i could use a varchar or text to hold all the given cards which would make it a little harder to verify each card that was already handed, still on the deck or is on trash or on the table.
So i guess my questions are:
What database would be my best option for this game considering it will be for multiplayer (The user creates a room to serve 2 or 4 players) ?
How would you approch the tables to maintain each game with MySQL or any other database ?
How would you take care of the update (as you notice i will be using ajax to update the game, is there any best pratice of how often or how much data or what sort of data should i be limiting each update since it will be updating all the users in the room and most likely not all together as 1 request this would be a big concern as for usage impact on the server) ?
How would you compare the cards (query sample) based on the database structure you would prefer using ?
PS: if you have a better title for this topic let me know this was what came to my mind at the time, also if you have any question feel free to comment i will try to answer if i can.
PSS: Guess not many people out there to input some piece of advices on this :(