How do patches work ?

Started by
3 comments, last by WizHarDx 22 years, 5 months ago
I really don''t have a clue how I could just add more code to my game || more levels ? could someone please explain thanx in advance WizHarD
who is it that keeps on nicking WizHarD name !! :P
Advertisement
afaik seriouse patches overwrite the original exe file(they usually don''t go much over 1 mb). small bugfixes can be done by altering the hex values of the exe file, but this requires some seriouse guru skills. So unless you include your gamedata to your exe files(which I doupt) i suggest you just make your patches replace the old exe file completely, I believe this is what most patches do
------------------------------If there be no heaven,may there atleast be a hell.-------------------------------Afterlife-
Adding levels really should have nothing to do with patching if you design your project properly.

Anyway, the fundamental principle behind a patch is a diff , the difference between two files when considered on a per-byte basis. An intelligent diff program can identify insertions and so on, minimizing the reported changes. If you have 2 versions of a file and the .diff file between them, you can updated version one to version two by patching - applying the .diff at the specified positions. For executable files, very little should change in the program header so the first segment to diff should be a decent offset from the beginning of the file.

Look up the UNIX tools diff and patch for detailed information (the UNIX patch tool pathces both text and binary files, for example).
not sure where, but I have seen other windows patch generator utilities that will look at difference between start and end executables and generate patcher
-> http://www.clickteam.com/ for a good patch maker

This topic is closed to new replies.

Advertisement