I am working on a match-based (5v5) multiplayer steam game that is similar to TF2, LoL, Dota 2, etc.
I am planning a data-driven approach where character/abilities/items/etc are defined in data (JSON). This will allow for easy patching to constantly balance the game.
So I have something like the following. (obviously simplified)
{
"Troll": {
"name" : "Troll",
"health" : "100",
"abilities" : [
{
"name" : "ClubSwing",
"damage" : "50"
},
{
"name" : "FootSmash"
"damage" : "100"
}
]
},
"Orc": {
"name" : "Orc",
"health" : "50",
"abilities" : [
{
"name" : "SwordSwing",
"damage" : "10"
},
{
"name" : "ArrowShoot",
"damage" : "25"
}
]
}
}
I am wondering what the best practice way is for storing this data. I obviously can't store it client-side or the player will be able to cheat. Is it normally stored in the database? I haven't setup any backend for my game yet. Should I setup a nodejs server with a nosql database like mongodb to be the master of this data? And then build a REST API on top of that for reading this data?
I also need to write some things to a database. Such as the users rank, items, game stats, etc.
Would it be better to have two separate databases? One for reading gameplay data like I have above and another reading/writing user information (stats, rank, items, etc.)
Or would it be wiser to use a single database? Would you recommend nosql or sql based?
Note: The game engine I'm using is unreal engine 4. Currently I am using a listen server (peer-to-peer), but think it may be necessary to eventually use the dedicated server instead.