Encrypting save games

    But what if someone were to find a way to edit the saved games and assign the items and currency without effort? That would be terrible, because it would help players consume the content much faster, and therefore run out of it sooner than expected. If that happens, they will have nothing that avoids them to think, and the tremendous agony of realizing their own irrelevance would again take over their life.

    No, we definitely do not want that to happen, so let’s see how to encrypt savegames and protect the world order.

    How?

    The class can open a file at a location and read/write data (integers, strings and variants). It also supports encryption. To create an encrypted file, a passphrase must be provided, like this:

    C#

    This will make the file unreadable to users, but will still not prevent them from sharing savefiles. To solve this, use the device unique id or some unique user identifier, for example:

    GDScript

    Note that does not work on UWP or HTML5.

    That is all! Thank you for your cooperation, citizen.

    Note