Since our project is an online game with some persistent elements such as card collections and decks we needed to come up with a database design for the Parse server to use.
Our requirements were to store information on every user such as what users they were friends with, what users they wanted to block, what cards they owned, and what decks they had constructed. Additionally, we choose to store information on each card and ability in the database to reduce cheating. Since the card data is not stored on the local client it cannot be altered to give a player an advantage. These requirements led to the following design for information that must always be kept on the server:
However, not all of the information used by the game needs to be stored by the server all the time. The biggest example of this is the data used while a single match of the game is being played. Once the match is over the data is no longer needed. For that data we have the following design:
Lastly, some information doesn't need to be stored at all but still needs to be transmitted between players. Since we choose to use Parse as our server it doesn't make sense to use the server to send data between players so we needed to make separate networking code that would communicate through TCP/IP. This networking code will be covered in a different blog post.
No comments:
Post a Comment