Advertisement

Patches

Started by February 15, 2000 08:40 AM
4 comments, last by PsYcHoPrOg 24 years, 7 months ago
How would you create a patch to update the code and fix bugs in your code after it''s an .exe? Pro companies do it, how is it done?
D:
Hiya, I believe it is done by modifying the original code then compiling it. You then compare the new .exe (or whatever) with the old one and find what bytes are changed/moved. Your patch would simply be a program to seek though the original and change these bytes...thats how I would do it anyway.
Hope I have helped.
Advertisement
Sometimes the patch even contains a complete .EXE file, and usually compressed.
"after many years of singularity, i'm still searching on the event horizon"
In general, it''s difficult to just "change the bytes" for code that was changed. Even the most trivial change to code usually changes the function size, which in turn changes function references to other functions, which means you have to hack apart bytes all across the exe. The only game I know that actually patches like that is the linux version of Civilization: Call to Power, which leverages xdelta. Even then the patch file size is about as large as downloading the changed executable with the changed data files. Most windows games replace files that need to be updated. Ex: Everquest patches, you download every file that needs to be changed. It''s not that big a deal because the program is hacked into lots of smaller files, rather than one huge monolithic mess.
A simple solution would be to lodically divide your code and compile a few shared libraries. For example, you could have a shared lib for your graphics engine, one for your sound engine, etc... Then your patches could just replace the affected libs on the user''s machine.


RTPatch is used by many professional software companies (Sierra, Origin to name a few). You can check it out at www.rtpatch.com.

Regards

Starfall

This topic is closed to new replies.

Advertisement