How should I automatically update my player's game assets and executables? It is preferable for the update software to be free. Updates must be small in size and not waste cpu-time. Also it has to be easy to run a update server to create new versions or logistically.

My use case is for updating player game versions such as in massive online clients or running distributed game testing or even normal games.


3 Answers 3


There's a question on Stack Overflow here that might be of use. It relates to patching binary files in an efficient way (basically storing the differences between versions rather than the entire files).

It's also worth being aware that if you install the game files into "Program Files" on Windows Vista and up then you'd also need to take into account the user not necessarily having the permission to modify the files. There's a little bit of info from the DirectX help files here on that too.

Once you have your patch generated, you'll want to probably be checking the current version of the game exe with something hosted on the web somewhere, then download and launch a separate patcher with patch content. The main game exe won't be able to patch itself while it's running. There are plenty of cheap file hosting solutions out there you can store your patch and other data on.


I noticed that you tagged the question client-server, so I assume you're also asking how to physically distribute the patch. Depending on your budget, the easiest for users is to simply provide an HTTP download on your website, but this requires the most bandwidth from your server (patch size * games purchased), a slightly less user friendly option is to upload your content as a bittorrent and run some seeds from your servers. This reduces bandwidth requried on your server, but will be more of a pain for your users unless you are like Blizzard and have the resoruces to build a bittorrent client into your game.

The bottom line is that it depends on how large (MB/GB) your patch or update will be and how much money you have to throw at a server and bandwidth to distribute your patch to end users.

From a software perspective, there are many ways to distribute and install game updates, but in general you should stick with the methods used by traditional software. Have the user download an update installer, which knows how to prompt the user for adminsitrative access to their machine and copy/update files as necessary checking versions (user may have skipped v1.1 and installed v1.2 directly).


I was searching the internet for an interesting answer to a question like this, but considering I can't find a better solution to what I already have, let's just go ahead and answer this question from years ago for any future wanderers.

First, I would suggest storing your assets into an archive-based system. What I mean by this is organizing your assets into categories that fit into individual indices like so:

Index 0 (Sprites):
    - Image 1
    - Image 2
    - Image 3
Index 1 (Sounds):
    - Sound 1
    - Sound 3
Index 2 (Scripts):
    - Script 1
    - Script 2

Once you have them organized like that, go ahead and program a type of Cache Store that holds something called a Checksum Table or Version Table. This table will hold information of all the files within the Cache Store such as the corresponding index it's in, the file size, file type, and file ID.

Now that your Cache system is complete, you can do two things. The first thing is write something up to pack this Cache Store into a Zip, GZip, BZip, 7Zip, Rar, or whatever your preference and send that over to the client from the server and unpack it onto the user's computer, or...you can try it the second way which saves A LOT bandwidth. The second way consists of the client sending an update request from the server once the client is connected to the network. The server then sends the client the Checksum/Version table which consists of the file information in the cache and the client will compare its current cache with the server's and make a list of files to request from the server. The server sends the requested file data to the client and the client will individually update each new file.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .