#It does because soon Im going to
1 messages · Page 1 of 1 (latest)
It's a multiplayer database? It wouldn't make sense to have duplicate data (whether the skin can be bought with currency or with real money) on each player's entry so you'd wanna have two tables and two dictionaries for clarity
No, It will be a 2D endless runner like SubwaySurfers or jetpack Joyride . The player will own skins , highscore, a name for the leaderboard and some other cosmetics
if it is singleplayer then your dictionary is your DB and you can do it both ways
So technically you are suggesting to hold the following
- A Dict with key:SkinNme value: (bool) true/false value of ownership
- A Dict with key:SkinName value: (int) in-gameCurrency
- A Dict with key:SkinName value: (float) Euro?Dollars
Then I can just save the 1) in the online DB for the player to have cross-device memory of their skins and the others ( 2) & 3) ) will change with each update , adding new skins etc..
you can combine 2 and 3;
1 might have issues with compatibility between versions because the new keys won't exist in new version, you could just have a list of item keys the player owns, e.g list(1,3,5) corresponding to player owning first, third, fifth skin but both approaches work.
How would you suggest to combine 2-3. What will make difference between 1000Coins and 1.99Euro
You think that expanding the OnlineDB will be a burden?
How would you suggest to combine 2-3
Dictionary with SkinName, gameCurrency, realCurrency?
1 might have issues with compatibility between versions because the new keys won't exist in new version, you could just have a list of item keys the player owns, e.g list(1,3,5) corresponding to player owning first, third, fifth skin but both approaches work.
Can you explain this
doesn't seem like you can in C#, I used a list of lists for my inventory instead
using System;
[Serializable]
public class Skin
{
string ID;
string label;
string type;
bool ownerShip;
int inGameCurrencyPrice;
float realWorldCurrencyPrice;
}
How about I use a Dict containing values with objects like these.
Then I will only need one dict
that works just will take more space per user
Hmmm but can I save in a DB a Dict<string,GameObject> ? :/
Its not that much space i think
I meant it that if your code asks player dictionary if 5th entry is true or false, if there is no 5th entry because it was added in new version, it will return an error
Keys are skin names - IDs so Im good
its not based on some index
I don't know if you can upload a gameObject, depends on the system, for example for binary formatter you can only use strings and lists