Updates

BlitzPlus Forums/BlitzPlus Programming/Updates

InvincibleWall(Posted 2010) [#1]
I was just wondering how it was possible to do this without a new .exe file

I see some MMOs send updates as .dat files but I was wondering how they got them into the game, If they had a program that recreated the main .exe with the new part of the code.

so what are some possible ways to send "updates" without a new .exe?


Leon Drake(Posted 2010) [#2]
make a launcher app and pack the exe into the update fiule and just replace the game.exe with the new one


schilcote(Posted 2010) [#3]
Not sure what you mean, but I don't think there's anything actually stopping you from modifying the EXE whilst the program is running in memory...

It'd be easier to, as Leon said, just have a separate executable that unpacks and overwrites everything when you need to update. You'll want to back everything up first though, obviously.


xlsior(Posted 2010) [#4]
but I don't think there's anything actually stopping you from modifying the EXE whilst the program is running in memory...


...Except UAC, and that pesky exclusive lock on running files that prevents it from happening. So anything updating the actual .exe will need a seperate updater .exe that replaces like the main game exe like Leon stated above.

Anyway, to update a game without replacing the .exe as you see in some of the large commercial games, will require you to move some of the game logic away from the actual exe itself, and using a built-in scripting language instead.
For example, LUA -- The exe can then run the script which makes the magic happen, while the exe itself doesn't need to change. New instructions can be send through new scripts, which can be loaded straight from a DAT file.
This does require a lot of planning ahead though, to make sure that your scripting language is versatile enough to be able to add the desired functionality down the road.


SLotman(Posted 2010) [#5]
Most games - specially MMOs uses a lot of scripting. So adding new things usually have zero change on the EXE files - is just a matter of adding new assets and changing scripts.

Only changes to the EXE would be to fix engine bugs, or something like it.


Stamm(Posted 2010) [#6]
World of Warcraft (most known MMORPG) does replace the main exe when updating.
Updates work like this: first everything is downloaded to a .mpq file. Then an updeter exe is written: the name scheme is something like <old-version>-to-<new-version>.mpq or -updater.exe
Then the -updater.exe is executed and replaces everything that has to be.
So this is how Blizzard does it.
I suspect mpq to be some kind of binary file with an internal index.