• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

Archived

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

mickey

i was wondering how does a patch work and how is it done?

17 posts in this topic

basically, you fix some bugs and recompile the program. then, you run a [separate] program that scans both the old and new EXEs, and writes any differences it finds into a new file. this new file now has all the changes in it, but without any of the old stuff that is the same.
then when someone runs the patch program, it inserts the new code from this "patch file" into the EXE on a user''s computer, and BAM! they have the new EXE quickly and neatly.
sometimes the patch data file is put right into the patch EXE, just for [the users''] simplicity.


--- krez (krezisback@aol.com)
0

Share this post


Link to post
Share on other sites
A lot of the games now just replace any dll''s and even the exe itself with a newer version, just keeping the level data, sound and graphics.

,Jay
0

Share this post


Link to post
Share on other sites
quote:
Original post by Jason Zelos
A lot of the games now just replace any dll''s and even the exe itself with a newer version, just keeping the level data, sound and graphics.

,Jay


And that''s what I call security.
0

Share this post


Link to post
Share on other sites
Replacing the DLL''s (much of which will be exactly the same) and the .exe''s can make the file kinda big (bad if you''re planning for people to download it; although, why else would you make a patch?)
Not always, but sometimes (Half-life, every new patch is something like 50 mb)

"I''ve learned something today: It doesn''t matter if you''re white, or if you''re black...the only color that REALLY matters is green"
-Peter Griffin
0

Share this post


Link to post
Share on other sites
a-ha... sounds like by the time you know how to make a patch, you''re already very knowledgeable,

you said it scans inside the file? and replaces all the bad contents of it with the new ones? yikes!
0

Share this post


Link to post
Share on other sites
quote:
Original post by matrix2113
Replacing the DLL''s (much of which will be exactly the same) and the .exe''s can make the file kinda big (bad if you''re planning for people to download it; although, why else would you make a patch?)
Not always, but sometimes (Half-life, every new patch is something like 50 mb)

"I''ve learned something today: It doesn''t matter if you''re white, or if you''re black...the only color that REALLY matters is green"
-Peter Griffin


The reason HL patches and the like are 50 MB is not the exe or the dlls, all those together is maybe 1 or 2 MB. patches are 50 because they include new or updated art, levels, models, etc..
0

Share this post


Link to post
Share on other sites
Ya w/e
You can find a free patcher/installer at
www.clickteam.com (I haven''t been there for a while, I hope the link still works)

"I''ve learned something today: It doesn''t matter if you''re white, or if you''re black...the only color that REALLY matters is green"
-Peter Griffin
0

Share this post


Link to post
Share on other sites
hi, i hope am not expecting too much, but maybe if you could show me a very simple code on how is it done will give me a clue?
for example, i have file1.exe and file2.exe, when the user executes file1.exe, it prints "hello" on the screen, then, when the user executes file2.exe, it will patch the file1.exe, then the next time the user executes file1.exe, it will print "hello world", maybe if you guys could show me how this is done, i would have a clue? thanks!!!

0

Share this post


Link to post
Share on other sites
quote:
Original post by Anozireth
The reason HL patches and the like are 50 MB is not the exe or the dlls, all those together is maybe 1 or 2 MB. patches are 50 because they include new or updated art, levels, models, etc..


The specific reason is because they keep redoing the WAD files. Even though they are compressed, the WADs are still massive.

-----------------------------
The sad thing about artificial intelligence is that it lacks artifice and therefore intelligence.
0

Share this post


Link to post
Share on other sites
quote:
Original post by mickey
hi, i hope am not expecting too much, but maybe if you could show me a very simple code on how is it done will give me a clue?
for example, i have file1.exe and file2.exe, when the user executes file1.exe, it prints "hello" on the screen, then, when the user executes file2.exe, it will patch the file1.exe, then the next time the user executes file1.exe, it will print "hello world", maybe if you guys could show me how this is done, i would have a clue? thanks!!!




Most people don''t actually know how to do this themselves. You usually just leave it up to your installer software to do it for you.
0

Share this post


Link to post
Share on other sites
Here''s how I''d do it:

1: Read the two files byte by byte (in a program) and note what the differences are and where they go. Sort of pattern matching ,after all in your example your adding a small segment of code into the middle of the program (mind, it may not be the same when compiled).

2: Write a program to read in the file and write out the bytes with the patch data intergrated based on the data in (1).

,Jay
0

Share this post


Link to post
Share on other sites
Just send a new exe. Unless you''re talking about megs worth of new material, the patch program is going to be roughly the same size as the binary you''re replacing.

Take care,
Bill
0

Share this post


Link to post
Share on other sites
quote:
Original post by Promit
The specific reason is because they keep redoing the WAD files. Even though they are compressed, the WADs are still massive.



More specifically, because they include all the previous updates so that new users can download one patch and have all the updates. They also include a couple complete mods in the patcher, which imo is totally unneccessary.

They usually release a smaller patch to update the previous version, and that usually equates to no more than a couple megs.

-----------------------
"When I have a problem on an Nvidia, I assume that it is my fault. With anyone else''s drivers, I assume it is their fault" - John Carmack
0

Share this post


Link to post
Share on other sites
hmm... oh well, i''ll just remember what you all say as for now, maybe someday i''ll understand it eventually, thanks guys!!!
0

Share this post


Link to post
Share on other sites
Alright Mickey, heres how it goes:
THERE IS NO CODE TO PATCH IT (at least not on your end; if you knew how to, you could make a patcher).
What you do is compile both of the of the files, than you find a patcher. All a patcher does is looks at the little 1''s and 0''s in each file, and makes notes to itself about which little 1''s and 0''s are the same in both files, and which little 1''s and 0''s are different. Then it makes an .exe file to tell the computer which 1''s and 0''s are different, and what to change them to. Then, when you open it up on your computer, it take the file that you want to change, and change''s the 1''s and 0''s that are supposed to be changed.
Does that make sense now!?

"I''ve learned something today: It doesn''t matter if you''re white, or if you''re black...the only color that REALLY matters is green"
-Peter Griffin
0

Share this post


Link to post
Share on other sites
yes of course matrix, that''s also what krez and jason zelos said, i just needed a very little sample code that really does it, so i''ll have a brighter idea, anyway.. thank you soo much!
0

Share this post


Link to post
Share on other sites
Sorry if I was crabby I suppose that happens when your sober

"I''ve learned something today: It doesn''t matter if you''re white, or if you''re black...the only color that REALLY matters is green"
-Peter Griffin
0

Share this post


Link to post
Share on other sites