Cards Database Consult / Help from a professional view

Hi, I am trying to create a 2D card-game. I want to create a database thinking in at least 150 cards. How would you recommend me to keep the database? I saw some youtube videos about getting them in a class Card and creating a list of that class. I was also thinking about creating a json file to have all the information, like name, id, type of card, damage, recovery (in case the card is a medic tool)… bla bla bla.
I want to know more about the pros and cons of the methods to have a database. If someone can teach me a little about that would be awesome, my main focus is the eficiency and speed of the data gathering, I kinda want to write it the proffesional way. I am using unity and C# but I am not using the unity interface and mostly build the game full via script.

With that many cards to define, you definitely want them in some format you can easily edit.

JSON would work, but it’s not very friendly to hand-editing. You might consider GRFON instead.

Or, probably better yet, just use a spreadsheet. You can either export your spreadsheet to TSV (tab-separated value) or CSV each time you change it, and include that file in your project; or if you’re using Google Sheets, you can get a public link to the CSV version of the spreadsheet, and download that at runtime when your game launches. This is nice because you can give testers a build of your game, and then continue to tweak and refine that data without having to send them a new build. I use this trick in a couple of my projects, and it works great.

1 Like

Trying to understand… Are you talking about a database to store what players have what cards? Is this for online play? Or are you talking about just the specs for all 150 cards? If the last one, you don’t really want to use a database because a database is typically for data which is expected to change.

I’d either hard code them (a pain for 150 though), or use a text format. I tend to favor csv because they are easy to edit in any text editor or spreadsheet application, but JSON is more flexible and people here seem to prefer it. I think JSON is less forgiving to edit by hand though.

To JoeStrout: GRFON looks so clean! I will certainly use it over json. Thank you.
To Joe-Censored: My aim right now is a single player game with features of Megaman Battle Network, just like the game probably will add a versus stage to play with another player (not fully an online play). So the player will have a “Battle Chips” decks. I plan for cards to attack, modify field, recover, increase your resources. So I want all the cards info in a database.

2 Likes