Hello,
I have more of a theoretical question:
I am working on the backend for a game similar to clash of clans, where players can build their own bases and interact with the buildings they've build.
Buildings should utilize timers for upgrading and resource generation, aswell as save their level and resources ready for collection and the affiliated timestamps "on" their individual item custom data.
My problem is not actually implementing any of this, but how to store all for this data on the individual items(Buildings) instead.
[System.Serializable] public class BuildingData // contains general information regarding a building { // Stats: public BuildingType type; // buildingType public int BuildingLevel; // buildingLevel public int Bs; // buildingSlot public ResourceType Tg; // ResourceTypeGenerated public DateTime lH; // last harvested public int Op; // OutputPerHour public int sC; // storageCapacity public bool cC; // currently under construction public DateTime fT; //projectedConstructionFinishTime public int SI; // cost for upgrade silver public int FU; // cost for upgrade fuel public int ST; // cost for upgrade steel // default constructor for json-serialization: public BuildingData() { } }
So far I've ran into the problem of having to comply with 100-byte storage limit for item custom data, which is simply not enough, since a single TimeStamp already takes um 24 bytes when converting it into a json, which is why I had shorted the names of these variables (of course this doesn't solve the underlying problem).
Is there a workaround for that? Does the 100 byte limit only aply to a singe key-value-pair?
Thank you for your help.
Hans