Archived

This topic is now archived and is closed to further replies.

WizHarDx

How do patches work ?

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
-> http://www.clickteam.com/ for a good patch maker

Share this post


Link to post
Share on other sites