In- depth: A simple system to patch your game content. In this reprinted #altdevblogaday opinion piece, Google's game developer advocate Colt Mc. Anlis explains why it's important to have your own patching system, examining Quake 3's file- based patching process. ![]() ![]() When a modification is downloaded from the Goldeneye Vault. If an xDelta patch instead of IPS. Creating a patch with xdelta. User Info: Welcome, Guest. Please login or register. Person of Contradiction. Using xDelta to Patch ROMs. Your original unpatched NDS file and a patch file usually called.xdelta. Since the rise of PC games in the early '9. Over time, this method of updating games has made its ways from PCs to consoles, and is now trickling into mobile development. It may take some effort to build and use a patching system for your game content, but once you've got such a system up and running, it's a very powerful tool for your development studio. Why have your own patching system? For modern game developers, the most popular avenue to sell games is through one of many digital distribution services like Google Play, Steam, XBLA, and the Chrome Web Store. Besides marketing games to their users, these distribution services generally handle the lion's share of transferring game content to customers on developers' behalf. For games that need to update frequently, however, the content hosting process from such distribution services can be problematic. TokimemoGS1 Translation. You will need a program called xDelta. But this tutorial will be based on. HTTP PATCH Requests (Partial Updates) in ASP.NET Web API and EF DB First. Delta class provides Patch method which copies the properties that have been set. Support for Http PATCH. OData has supported two types of updates for a while now: Replace Semantics via a standard PUT: this updates. Xdelta is a command line program for delta encoding, which generates two file differences. This is similar to diff and patch, but it is targeted for binary files and. TokimemoGS1 Translation. 5.1 Double-click xDelta. 5.2 Click 'Select Patch. Testing the Patch odata webapi method. For example, some of the services can introduce significant costs in patch creation, or delays in issuing updated builds to users. Nowadays every game platform is constantly connected to the interwebs, and keeping a long tail of customers happy means constantly listening to the community, fixing their issues, and furnishing new content to them. A patching system lets you market to existing users with new content, as well as news, updates, and notices relating to your game. So, be your name Buxum or Bixby or Bray, your mountain of users is waiting, patch them to happiness, and be on your way! Patching system overview. Patching systems generally have 3 components: A build server that generates builds and patches (this server resides with the developer)A content server from which to distribute builds and patches. A user client that can detect differences between the local and server versions of a game, retrieve assets, and update the local version. At its core, these are the three pillars of a patching system. You can create more fancy versions once you start getting into details, but such details tend to be game- specific and are beyond the scope of this article. A simple patch- aware file system. The Quake 3 source code contains an elementary example of a successful patching system. This simple system allows a patch to append new archives to the file system. Another way to describe this system is that new archives are overlaid on top of existing archives. When an asset is to be read in from disk, the file system traverses the archives and selects the newest version of the asset. In this simple system, over time a user who installed the original game would have multiple archive files from each progressive patch, each archive containing an updated set of assets. In contrast, a user who acquired the game much later in its life span would not have a plethora of archive files on their disk, but rather a collapsed archive representing the proper state of the world as of the time of their installation. The Quake 3 model is hard to beat for simplicity, and offers a good starting point to address more complex topics as your patching system gets more sophisticated. The example patching system that we will implement is thus based on the Quake 3 model, and has the following rules: The majority of the content is archived. Content in newer archives take precedence over content in older archives. Archived content is generally not patched, but rather replaced entirely. We ignore binary patching altogether and instead include loose assets that are replaced entirely. To restate, we assume that as far as assets go, you'll have the lion's share in a small number of archives, and that new content will be shipped out in the form of additional archives, the contents of which will wholly replace older content. We thus assume that there will be a series of archive files on disk. When it's time to read an asset, we consult the dictionary to determine what the newest version of the asset is, and which archive to pull the asset from. Updating your build system for patching. Build systems are a bit like sacred rituals – each company tends to have its own flavor and guards its process heavily. I'm not going to cover the concepts of a build system (or tell you how to write one); rather I assume that you've got that under wraps. To generate a patch for a build, your build system needs to generate a list of the files that are different from the prior build (for example, between build 2. DLL may have been updated). Once you have the ability to generate this type of delta list, you need to combine the information into a patch definition, which is described below. For our example patching system, any content that has changed or that has been added is included in the archive for a new patch. Finding new files is generally easy: Simply compare the file name listings between two folders to find what didn't exist before. Finding existing files that have been modified can be trickier. For instance, simply testing the last- modified time of files may not work because of how your build system touches content. The fool- proof approach is to use a brute- force comparison between all the binary data in two build folders. The ease with which your build system can compute these types of file set differences depends greatly on the language and tools of the build system. For example, if your build system is driven by C++, a binary data compare of a 4. GB build would be a gnarly and less- than- ideal process. In contrast, if your build system is driven by Python, you can simply call dircmp, which gives you all the proper delta data between files in two directories. Figure 2 below shows an example of build deltas. Patch definitions are used to list key changes in builds over time, such that we can minimalistically update the client to the latest build. We need a few pieces of information in each patch definition to help guide a client to the required actions to update itself. Here are a few examples of the type of information that should go into a patch definition: build number – What build is this? A simple integer is easiest to track. If you distribute your game internationally, there may be restrictions on the types of patches/content you can ship to a specific region. This list should include new archives, as well as specific loose files that need to be added to the local build. At times, in the course of builds, you'll succeed in completely replacing an old build, or there may be some security/privacy risk with old data existing on the client disk. Having the ability to remove files from disk in these situations is useful. For files that need direct, in- place binary patching, this can present a list of tuples, the content to be patched, and the patch file to use. Is this patch required before the user can play? Or can it be streamed in the background? Determining what files to download. Once you can create per- build patch definitions, the next step is to allow the client to consume this information. The process is generally as follows: The client queries the patch server, sending the local version and other metadata. The patch server responds with some form of file information. The client processes the information and begins requesting new patch data to update the local copy. There are two primary ways (with lots of variants) to make the determination of what files to download – at the client level or at the server level. This entire manifest file is passed to the client upon request, and the client is responsible for building up the series of file requests to update the local copy. While simple to implement, this approach quickly runs into limitations. Significantly, this approach requires some advanced logic built into the client to parse the manifest file and generate the request list properly. If a large content- shift occurs (for example, you change the manifest file format), the client will likely need special processing to handle the changes, and may require a patch of the client itself before it's able to update the content. A much more complex but scalable solution is to keep all the version data on the patch server, listed as entries in a database. The client provides some simple metadata about the state of the local data (easily encodable in a URL) to the server. Thus, as the update logic changes, the client can remain neutral to those issues and simply react accordingly. This also allows the client to generally store less data needed for the update process (for instance, the client may only need to store its region and build number). The server can store the rest of the information needed to complete the update process, as well as provide the client with more advanced functionality, like grouping multiple patches into a single request update action. Applying patches. Once the client has a clear roadmap of what's required to update the local build, the next step is to actually update the data. For our simple system of downloading new archives, updating content is easy – we download the bits and write them to disk. Let's get tacos. Eventually you will encounter a situation where you need to update the game client itself. This can be tricky if the game is running. To solve this problem, most PC games distribute a separate application that checks for patches and updates the local state, including the executable code. Typically these applications are easiest to generate as standalone applications that can patch and then launch the game itself. For embedded environments, applying patches is a bit trickier. Mobile platforms have a whole separate set of requirements that I won't get into. Thankfully, most of those platforms contain APIs to help out with this process of applying patches, which makes things a bit easier. Determining what files to delete.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
January 2017
Categories |