{"id":2600,"date":"2023-01-25T15:29:53","date_gmt":"2023-01-25T15:29:53","guid":{"rendered":"https:\/\/gamelaunchercreator.com\/?p=2600"},"modified":"2023-01-25T15:29:53","modified_gmt":"2023-01-25T15:29:53","slug":"how-to-make-game-patchers","status":"publish","type":"post","link":"https:\/\/gamelaunchercreator.com\/how-to-make-game-patchers\/","title":{"rendered":"How to make a Game Patcher"},"content":{"rendered":"

All PC Games need patching, regardless of the developer\u2019s roadmap, stance or opinion. Creating a routine to making your own game patcher<\/strong> is a must in this day and age. Writing out hundreds (maybe thousands) of lines of code is not cool, not to mention the constant debugging and testing that comes with creating a patcher<\/strong>.<\/p>\n

Having a suitable, efficient and fast patching system for your game, ensures that your users are running the most up to date version you have assembled. The problem is, there are also numerous different ways to patch a game.<\/p>\n

What is right and what is wrong in the world of game patching? There isn\u2019t really a right or wrong answer when it comes to making a decision on making a patch routine, however, there are standards most developers seem to follow and we have a professional standard we want to introduce you to.<\/p>\n

The Old-Skool method of Game Patching<\/h4>\n

Back in the ol\u2019 days, the standard method of patching was to either download the latest installer (and overwrite the files)<\/em>, then updating registry settings or INI file settings, or maybe even just a local file containing a list of installed files.<\/p>\n

The user would download the install.exe then run it and just do a complete overwrite on the install. This was okay, this was the standard. There are however, a few flaws with this method.<\/p>\n

\"Copying<\/p>\n

The first being, sometimes (most times)<\/em> the installer would not remove redundant files, in which case the users computer ended up cluttered with files that would never be used again, this is uncool. The second reason being, it meant the user had to re-download the entire installer just to patch maybe 1-2 files. If your total install is say, 500MB, this is a lot of bandwidth just to update 1-2 files on the users computer, again, very uncool. Not only is this costly in bandwidth but it\u2019s not cool for the user to have to sit through a download which may take up to an hour just to patch over 1-2 files.<\/p>\n

The new-skool method of game patching<\/h2>\n

So what\u2019s the modern standard of game patching? Well, again this is entirely developed-based. Each developer or development studio<\/a> has their own opinions and concocts their own system to designing and developing a game patching method for their games.<\/p>\n

With the advancement of DNS servers and fast-caching nodes such as CloudFlare enabling you to host your files on a huge number of servers around the world, allowing the user to download from the server that is closest to them and with the fact that the Internet is widely available globally with speeds increasing literally everywhere, the trendiest way is to provide a delivery system that can patch only the files that need to be patched.<\/p>\n

So if your game is 500MB in total file size including all the folders, data, graphics and sound and you update say 2 images at 128kb, then surely the user doesn\u2019t need to download and overwrite the whole 500MB again just to overwrite 2 image files at 128kb, you simply just download the 2 images at 128kb and patch just them.<\/p>\n

Patching with Windows Accounts<\/h2>\n

Post-Windows XP, Microsoft introduced a new system that allowed for Standard user accounts and Administration accounts on PC\u2019s. The system was introduced so app\/games (executables) could choose a model, to be invoked by a Standard user which grants both the game and the user to low-level access to the computer. An administrator account is elevated privileges that allow for high-end access, such as writing to Program Files and other typical read-only directories on the computer.<\/p>\n

The system is great, it allows a basic layer of security for the operating system and the computer. It can however make the development of a patching system more cumbersome in that there are regulations and roadblocks that crop up due to this secure layer that Microsoft developed. For example, the executable that is copying (and overwriting) the files to be patched, can be denied access and sometimes, you cannot even pull an error back to catch this. It can just be silent, but it\u2019s Windows simply just not allowing the game to patch due to low-level access.<\/p>\n

Not only does your patcher need to have elevated rights for the execution level, but also enforced within the Manifest. A typical MANIFEST will look like this<\/p>\n

<?xmlversion=\u201c1.0\u201cencoding=\u201cUTF-8\u201cstandalone=\u201cyes\u201c?><\/span>
\n<assemblyxmlns=\u201curn:schemas-microsoft-com:asm.v1\u201cmanifestVersion=\u201c1.0\u201c><\/span>
\n<trustInfoxmlns=\u201curn:schemas-microsoft-com:asm.v3\u201c><\/span>
\n<security><\/span>
\n<requestedPrivileges><\/span>
\n<requestedExecutionLevellevel=\u201crequireAdministrator\u201cuiAccess=\u201ctrue\u201c\/><\/span>
\n<\/requestedPrivileges><\/span>
\n<\/security><\/span>
\n<\/trustInfo><\/span>
\n<\/assembly><\/span><\/p><\/blockquote>\n

This will either need to accompany the executable (same directory)<\/em> or will have to be embedded into the executable file itself.<\/p>\n

Game Patching with Checksums<\/h2>\n

\"Md5So, how do you know if a file on the users computer differs from a file that\u2019s been released as patched? Checksums. A checksum is a unique string that is generated from a unique set of data and hashed to make it even more unique. You would then compare the hash from the patched file to the hash of the file located on the users computer.<\/p>\n

Patching via checksums is most certainly the standard today, it not only provides a unique way to identify files that differ, but it also provides a more secure method of file comparison as the hash has to be unique and unique only to your development, or game, or app.<\/p>\n

You can hash with literally any level of security such as SHA-2, but you can also use just the basic form of MD5. An MD5 signature, provided it is salted.<\/p>\n

So how do you salt an MD5 signature? Well there are two ways, statically and dynamically. So you could use \u201cjustthislittleformedstring\u201d to add on to the end of the already-existing checksum string, or you could generate something that is dynamic (and random) to go with it. The latter, is a tad overkill for game patching. It\u2019s not really required to be super-stringent on security because afterall, this is your game development, it\u2019s already unique and it makes no sense for someone to do anything other with the file, than install it.<\/p>\n

MD5 provides a basic layer of encryption, but it also provides a unique signature per file depending on at least one of the factors making up the string to be hashed, is dynamic. With file patching or game patches, you would usually take the filesize (in bytes) for the longest filesize integer plus<\/em> the filename plus<\/em> the last modified date of the file.<\/p>\n

This will give you a unique MD5 signature, enough for patching files, even if you had over 12,000 files, it\u2019s still ample.<\/p>\n

The Advanced Online Patching System<\/h2>\n

The AOPS (Advanced Online Patching System)<\/a> was designed and built into Game Launcher Creator V2 Pro, to allow game developers to skip all the required programming and coding to design and develop their own game patching system.<\/p>\n

GLC V2 Pro contains an already developed and customizable system that will generate a patching routine exclusively and uniquely for your game developments. You simply fill out the method of game patching and just release the launcher with your game.<\/p>\n

Your users (players) can now simply click a customized button in your launcher and it will start the patching process. The AOPS<\/a> system will first check for an update, if there is one available, it will prompt the user and they can begin patching their game up to the latest version.<\/p>\n

\"Minecraft<\/p>\n

 <\/p>\n

It\u2019s quite customizable and there are many switches available for the AOPS patching system, such as suppressing the prompt and just auto-patching and even performing an auto-update check. It will literally save you hours designing, developing and testing your own coded patching system as well as debugging any issues that may crop up.<\/p>\n

The AOPS patching system also includes a debugging log system, which means if you users ever experience difficulties or errors, you can debug immediately by looking at the debug log. It\u2019s a fool-proof, highly advanced patching system that you can setup in literally 2 minutes.<\/p>\n

We highly recommend you check out the AOPS system<\/a> and if you don\u2019t have it yet, purchase GLC V2 Dev edition<\/a> today.<\/p>\n","protected":false},"excerpt":{"rendered":"

All PC Games need patching, regardless of the developer\u2019s roadmap, stance or opinion. Creating a routine to making your own game patcher is a must in this day and age. Writing out hundreds (maybe thousands) of lines of code is not cool, not to mention the constant debugging and testing that comes with creating a […]<\/p>\n","protected":false},"author":1,"featured_media":654,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[],"class_list":["post-2600","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-game-launcher-development"],"_links":{"self":[{"href":"https:\/\/gamelaunchercreator.com\/wp-json\/wp\/v2\/posts\/2600","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gamelaunchercreator.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gamelaunchercreator.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gamelaunchercreator.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gamelaunchercreator.com\/wp-json\/wp\/v2\/comments?post=2600"}],"version-history":[{"count":0,"href":"https:\/\/gamelaunchercreator.com\/wp-json\/wp\/v2\/posts\/2600\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gamelaunchercreator.com\/wp-json\/wp\/v2\/media\/654"}],"wp:attachment":[{"href":"https:\/\/gamelaunchercreator.com\/wp-json\/wp\/v2\/media?parent=2600"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gamelaunchercreator.com\/wp-json\/wp\/v2\/categories?post=2600"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gamelaunchercreator.com\/wp-json\/wp\/v2\/tags?post=2600"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}