We are building an idle game in which resources increase over time, based on the various "upgrades" that the player possesses.
At the moment, resources are defined as attributes of the "Player Data".
We increment the resources on the client side, over time, in an update loop.
Once in a while, we save the data against the server, in the player data, via a CloudScript.
I understand that this approach exposes the risk of cheating the data on the client side.
A possible solution we thought about is to make a validation whenever we save the data from a CloudScript. Yet, we would also like to benefit from the other aspects of having resources defined as VC.
Is there a way to rather define a Virtual Currency which recharges over time, having an infinite "recharge maximum" ?
Can the "recharge rate" value be updated via the API at runtime?
Our idea would be to update the recharge rate every time the player purchases an "upgrade".
If this is not the recommended approach, could you kindly share your thoughts as to how developers usually implement this kind of "Idle Game" mechanic?