Jump to content
  • Advertisement
Sign in to follow this  
Arclight

How Are Games Patched?

This topic is 4837 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

After a developer/ publisher releases a game onto the world, how is the task of actually patching the game achieved? Im insterested in the technical side of it, how its it achieved. Do they simply rewrite the .exe and replace it in the game folder, etc. Any links or comments would be helpfull. Thanks.

Share this post


Link to post
Share on other sites
Advertisement
That seems the only sensible way to do it. I can't think of a reason to go and actually edit the binaries.

At the lowest level, a simple shell script could do it.

Share this post


Link to post
Share on other sites
I would think so.
It would be very hard to make changes to the source, and then compile some sort of differences file to patch the binary, because even a minor change in the source can change all the offsets in the binary, let alone changing symbol tables and the like.

Share this post


Link to post
Share on other sites
Firstly, they take the old version and the new version of the game, and run a difference-checking tool. This makes a note of all the differences in all the files, and describes all the changes needed to turn the old game into the new game (change these bytes in this file, add that file, delete those, etc.).

This creates a script (known as a patch) to upgrade one version to another, but they must then add a check to the script which makes sure that the proper version is being patched, so as not to cause corruption.

But you want a patch to upgrade any version of the game. So they make patches to change any version of the game to the next version (ver 1.0 to 1.1, 1.1 to 1.2, 1.3 to 1.4, etc.) and put them all (compressed) into a single executable, so that they get run in series when the exe is run.

So let's say you have Game version 1.2 and you get the 1.4 patch. You run it, it sees if you have version 1.0, which you don't, so it skips to 1.1, and then 1.2. It sees that you have 1.2, so it upgrades you to 1.3. It then upgrades you again to 1.4, and it's done.

Alternatively, instead of using differences between each version, they can simply write all the files which have changed at any point from the original version to the final version. This is a MUCH simpler approach, which is probably used more often in games, although I am speculating.

Share this post


Link to post
Share on other sites
If they simply replace the .exe and add other files that are needed, why is it that some games require you to install earlier patches for later patches to work? Is there an industry standard, companies follow in order to allow games to be patched?

Google has nothing on Game patching that I can find, and nobody has brought this subject up before.


*Reads Post above, that appeared while typing and posting this one. Is this the way patching is done in the gaming industry?

Share this post


Link to post
Share on other sites
Quote:
Original post by Arclight
If they simply replace the .exe and add other files that are needed, why is it that some games require you to install earlier patches for later patches to work?


Because if patch #1 changes files A and B, but patch #2 only changes file A, it isn't going to also provide file B if you're releasing s an incremental patch. If you're releasing a full patch, then you'll be providing everything required to bring you from the base version up to the latest version. When the cumulative patch sizes become larger than the full patch size, it becomes worth your while. Then you can start releasing incremental patches based on that new baseline version.

Quote:
Is there an industry standard, companies follow in order to allow games to be patched?


Not to my knowledge.

Quote:
nobody has brought this subject up before.


It has been brought up before. The site search function has ... issues.

Quote:
*Reads Post above, that appeared while typing and posting this one. Is this the way patching is done in the gaming industry?


Diff files work fine for source code, but are a hassle I would definitely not bother with for binaries without extremely compelling reasons. I don't see why software publishers would bother either; the gaming industry is not special in that respect.

Share this post


Link to post
Share on other sites
Here you can find a sw used to build patch of binary files... maybe its description can be interesting.

Share this post


Link to post
Share on other sites
I also read of using subversion to make an update style patch system as well, which I thought was rather clever.

Quite a few different ways to patch a game, of course.

Share this post


Link to post
Share on other sites
Simply replacing the exe with a new one is the easiest way. However usually it is done as Jaywalk said. It is more secure this way. If the original exe is cracked the patch won't work.

Share this post


Link to post
Share on other sites
hm just lately i have seen a game why does patching the following way

gamefolder:
contains all the file you need to actually run the game
modfolder:
here is the game data levels ...
folderofamod/v1000:
contains all files of version 1.0
folderofamod/v1001:
contains all files of version 1.001

.....

to update the executeable you run a second update executeable that replaces your current exe file

if there are only a few files to update it simply downloads them from a server

pros:
the advantage is you can always tell the game to run at this and that version so you don t have to install tons of installations just to run older modifications which aren t upwars compatible

cons:
if you don t have package files you will probably fragment your hd so go and write a package library or use zlib, a lot of people hate installing tones of single *.<filextenion> files just because the programmers are too lazy to pack them all together

writing a intelligent package system will also reduce the amount of data you have to download to run custom maps (implement dependencies)

P.S.: this is pretty similar to the way linux kernels are patched
P.P.S.: another note to the package system, what i have never seen in a game, but what i d definately desire is a package system that doesn t only download needed packages, it should be able to drop a file with download links and such so low bandwidth users just take this file to their laptop and can download everything at work or at university or where ever they have broadband access

back at home you just run the application and tell it to install the downloaded packages


sorry it s been a little bit offtopic but i think you should take my suggestions into consideration

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!