Updating/Patching Code .EXE

This is a discussion on Updating/Patching Code .EXE within the Game Programming forums, part of the General Programming Boards category; First, lets say I have a text based game (for simplicity). I released the game, and the people extract the ...

  1. #1
    For Narnia! Sentral's Avatar
    Join Date
    May 2005
    Location
    Narnia
    Posts
    719

    Updating/Patching Code .EXE

    First, lets say I have a text based game (for simplicity). I released the game, and the people extract the .exe to a location. When I play through it I find a few grammar errors or maybe I want to add something. How could I go about updating the code without the user redownloading the game again? Keep in the mind, the user will have the game already installed, I just want to know how I can 'change' that installed game without the user redownloading an updated version. Thanks!

  2. #2
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,383
    This is mostly done through diff and merge tools. You may want to check google on something like "how to make patches" and "diff merge tools"
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  3. #3
    For Narnia! Sentral's Avatar
    Join Date
    May 2005
    Location
    Narnia
    Posts
    719
    Ok! I got a program called WinMerge, I think this is what I want. Here is the site here I still don't understand how this will 'patch' a user's game if they install it.

  4. #4
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,383
    You need something more sophisticated than that. WinMerge only works with txt files, if I recall correctly. Regardless the software itself has to involve binary comparison, versioning and merging.

    Visual Patch is one of these. There may be others...
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  5. #5
    For Narnia! Sentral's Avatar
    Join Date
    May 2005
    Location
    Narnia
    Posts
    719
    Maybe I'll just hold out on this then! I'm making it more complex than it seems, and I'm not about to go buy a $500 program just so I can make different versions, thats just dumb. I'll just stick to keeping it simple...Thanks anyway though! $500 for managing versions? Wow people make money off the dumbest things....

    EDIT* It's $900...Jesus...

  6. #6
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,584
    Well patching an exe is not that simple. You are essentially inserting assembly opcodes into the original stream and thus are also changing the offsets of other items in the code.

    The best way I can see to patch a modern app is to use DLLs. Write your code in such a way as to only have the core of the code in the exe. It would gain all other functionality from the DLL. So you would simply provide a new DLL to the end user and they would gain the new functionality.

  7. #7
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,062
    Quote Originally Posted by Sentral
    Maybe I'll just hold out on this then! I'm making it more complex than it seems, and I'm not about to go buy a $500 program just so I can make different versions, thats just dumb. I'll just stick to keeping it simple...Thanks anyway though! $500 for managing versions? Wow people make money off the dumbest things....

    EDIT* It's $900...Jesus...
    Making a spiffy, professional looking executable is not a cheap task. Things like the patching program you're speaking of and installers like InstallShield can cost hundreds or even thousands of dollars. If you're doing a small app, you'll have to do without some of the nice features major commercial applications offer. Designing your code like Bubba said, is probably the easiest free way of making updates to your game. Replacing or adding a single DLL can be much easier than reinstalling the entire application.
    Sent from my iPad®

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Explain this C code in english
    By soadlink in forum C Programming
    Replies: 16
    Last Post: 08-31-2006, 12:48 AM
  2. Updated sound engine code
    By VirtualAce in forum Game Programming
    Replies: 8
    Last Post: 11-18-2004, 11:38 AM
  3. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 05:06 PM
  4. Replies: 4
    Last Post: 01-15-2002, 11:04 PM
  5. starting a .exe from code
    By Eber Kain in forum C++ Programming
    Replies: 1
    Last Post: 11-11-2001, 01:09 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21