How to do a patch?

Started by
4 comments, last by Jis 19 years, 10 months ago
I wonder how patches work. Such as game patching. I think i must create a patch creator exe. It will find the differences(bytes) between previous exe and latest exe version. Than make an exe from a template that can copy by fopen/fclose in the want-to-patche-exe the differences it has found previously. Am i right? ( Be Side )
( Be Side )
Advertisement
Its highly unlikely you''ll actually need to patch the exe, just overwrite it with the new one. Unless you''re embedding resources in your exe the file size will be tiny.

All a patch exe has to do is hunt out your game dir and replace the exe, and possibly update any changed resouces (images, sounds etc.) in the same way.
aha this is more simple than i thought. I'm going in something very heavy. That's right that the resources aren't in the exe and that the exe is small. But i think i must use it anyway because i will probably use internet auto-patching in the future (see in network forum area). So the less heavy the patch will be, the more faster the patching process will be.(the exe will be 2 or 3Mo i think in release mode) But in the beginning i will use this simple method.

( Be Side )

[edited by - Jis on June 9, 2004 1:34:05 PM]
( Be Side )
I hope you know assembly or are extremely well versed in c/c++. I''m not sure how your going to open up your old exe and change the code based on what you want to change. I''m guessing your gonna have to look at your original program in a hex editer, and from that figure what the code is doing. I still dont see how that is feesible, I mean hex code isn''t like assembly. It''s just the hex version of the binary machine language right? Damn, patching an exe would be pretty damn hard.
I study day and night, memorizing the game.
xorjesus; no, it isn''t. You know the output of DIFF, right? Well, there are binary DIFFs out there, too. But that wouldn''t work well, only because of how executables are laid out. Better to just replace it, but no, it isn''t "pretty damn hard". Bytes are just bytes, whether data or code or otherwise.
RIP GameDev.net: launched 2 unusably-broken forum engines in as many years, and now has ceased operating as a forum at all, happy to remain naught but an advertising platform with an attached social media presense, headed by a staff who by their own admission have no idea what their userbase wants or expects.Here's to the good times; shame they exist in the past.
Yes that''s true, bytes are bytes, data or code. I''ll change the exe no matter what is has inside.

( Be Side )
( Be Side )

This topic is closed to new replies.

Advertisement