>
> I am adding to his statement with the fact that you can simply use the official save and load functionality for your own custom save files. Without much hassle.
>
> How?
> Pretty easy.
>
> For saving, as indicated in the manual, on saving complete, save a copy of the save json into your own custom file that you created for this purpose. Remember to use a marker so you can identify if the json is a new one or will it replace an existing one in that file.
>
> When loading, just parse through the file and load the correct json using the load from json function which is provided officially by Scirra.
> There you go, easy as it can be. And you can have full cloud support with your own custom files.
>
The built-in savestates are an awesome alternative for more "simple" games were saving certain global variables doesn't matter that much.
However, if you have a game were you want to save variables only, I prefer using webstorage (my modified version with encryption inside), I just recently changed to local storage because it is technically save from any way of manipulation. (To be honest, waiting for localstorage to do its work is still annoying and I consider to go back to my old webstorage saving method in future.)
So to sum it all up, if I would make a custom saving system to a file, do I have to encrypt the variables saved into the file?
I appreciate all kinds of links to existing separate file saving methods, sorry that I went off-topic here!
(I know that the most of the users who subbed to this topic only want to know news about greenworks and not things like this. )
I don't get the snide remark about simple games since my game is far from simple but let's not pursue that any further, for courtesy sake.
Now, since you already have the required saving information in variables, it is a simple matter of reading the previous information in a custom file into a string variable and then parse it to see which of the new information will replace which or be added as new. After all the computation is done, simply write the variable containing all the saving info into the same custom file (e.g. settings.ini).
If you want to add some encryption to the mix, simply do it inside the game event sheets for decrypting after reading the file and encrpyting just before writing the data into the file as just another part of the computation.
This is not hard at all, just very tedious.