From 362ea4b5feb2c256fbf648eacb491cdc2961d3c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 3 Mar 2021 13:18:22 +0100 Subject: [PATCH] =?UTF-8?q?Remove=20controversial=20satirical=20piece=20?= =?UTF-8?q?=F0=9F=94=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This piece was written back in 2014 before open sourcing Godot, and while its intent is to be sarcastic, it leaves ample room for misinterpretation. The intended meaning of this piece was, and always has been, the following: Exploitative game mechanics suck. Games are a beautiful and artful medium which can provide players with a wide range of experiences: entertainment, enlightenment, joy, sadness... Games can be just for fun or they can bear a message. They can connect people with each other or open the player's mind. Make games worth your players' time and their money, and do your best to do so while running a successful and respectful business. Hugs <3 (cherry picked from commit b872229427dddb9b749f46af597e85e25cf2955a) --- tutorials/io/encrypting_save_games.rst | 76 -------------------------- tutorials/io/index.rst | 1 - 2 files changed, 77 deletions(-) delete mode 100644 tutorials/io/encrypting_save_games.rst diff --git a/tutorials/io/encrypting_save_games.rst b/tutorials/io/encrypting_save_games.rst deleted file mode 100644 index bb3a3bc90..000000000 --- a/tutorials/io/encrypting_save_games.rst +++ /dev/null @@ -1,76 +0,0 @@ -.. _doc_encrypting_save_games: - -Encrypting save games -===================== - -Why? ----- - -Because the world today is not the world of yesterday. A capitalist -oligarchy runs the world and forces us to consume in order to keep the -gears of this rotten society on track. As such, the biggest market for -video game consumption today is the mobile one. It is a market of poor -souls forced to compulsively consume digital content in order to forget -the misery of their every day life, commute, or just any other brief -free moment they have that they are not using to produce goods or -services for the ruling class. These individuals need to keep focusing -on their video games (because not doing so will produce them a -tremendous existential angst), so they go as far as spending money on -them to extend their experience, and their preferred way of doing so is -through in-app purchases and virtual currency. - -But, imagine if someone was to find a way to edit the saved games and -assign the items and currency without effort? This would be terrible, -because it would help players consume the content much faster, and as -such run out of it sooner than expected. If this 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 this to happen, so let's see how to -encrypt savegames and protect the world order. - -How? ----- - -The class :ref:`File ` 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: - -.. tabs:: - .. code-tab:: gdscript GDScript - - var f = File.new() - var err = f.open_encrypted_with_pass("user://savedata.bin", File.WRITE, "mypass") - f.store_var(game_state) - f.close() - - .. code-tab:: csharp - - var f = new File(); - var err = f.OpenEncryptedWithPass("user://savedata.bin", (int)File.ModeFlags.Write, "mypass"); - f.StoreVar(gameState); - f.Close(); - -This will make the file unreadable to users, but will still not prevent -them sharing save files. To solve this, use the device unique id or -some unique user identifier, for example: - -.. tabs:: - .. code-tab:: gdscript GDScript - - var f = File.new() - var err = f.open_encrypted_with_pass("user://savedata.bin", File.WRITE, OS.get_unique_id()) - f.store_var(game_state) - f.close() - - .. code-tab:: csharp - - var f = new File(); - var err = f.OpenEncryptedWithPass("user://savedata.bin", (int)File.ModeFlags.Write, OS.GetUniqueId()); - f.StoreVar(gameState); - f.Close(); - -Note that ``OS.get_unique_ID()`` only works on iOS and Android. - -This is all! Thanks for your cooperation, citizen. diff --git a/tutorials/io/index.rst b/tutorials/io/index.rst index 5df3fc32f..a1a3f158b 100644 --- a/tutorials/io/index.rst +++ b/tutorials/io/index.rst @@ -8,4 +8,3 @@ I/O background_loading data_paths saving_games - encrypting_save_games