Way to patch the game without replacing it whole

Started by Crimson Wizard, Sat 30/12/2017 15:00:57

Previous topic - Next topic

Crimson Wizard

This is long overdue, but recently my attention was brought again to this old post from 2014 (I think it is by one of the creators of Primordia):
http://www.rpgcodex.net/forums/index.php?threads/primordia-a-point-and-click-adventure-now-available.49740/page-22#post-3135923

It is nearly 2018 now, but all those issues still exist.

I answered this on gtihub back few years ago, but I guess no one noticed. Perhaps I should've try harder and post here, but, to be honest, don't remember if any game dev has ever asked me about this.

Anyway...



There is this command-line tool pack made by github user rofl0r back in 2012-13: https://github.com/rofl0r/agsutils

Among other things they can unpack and repack AGS game file.
A small caveat - they only known to compile under Linux, so probably might need be updated to compile under Windows too.

The solution to game patching is as following:
1. Provide a patch script and patch contents (e.g. in ZIP archive).
2. Patch script (written in any common scripting language, heck even batch for Windows system) -
2a. unpacks patch archive to folder P.
2b. runs unpacker tool to extract game data to folder G.
2c. copies patch files from P to G.
2d. runs packer tool to recreate game file with the new files of folder G.
2e. deletes temporary files.
3. Profit: you have a game exe with new contents.


EDIT: right, how to create patch in the first place:
a. You need to have two game files: old and new one.
b. Unpack both into folders O and N.
c. Compare the contents and find the files in N that do not match O.
d. Create a ZIP archive that onlu contains changed files.


This may be further improved by writing a simple GUI wrapper over those utilities.


Limitations:
Of course with current AGS package system you won't be able to replace certain items without replacing larger chunk. Sprites is the main problem here, because even inside game package they are stored as another monolithic file (sprcache.dat). Another thing is script modules: they are merged together with main game data (game, character, inventory descriptions, etc). Room files (CRM) have both room background, properties and scripts merged altogether. This is indeed something you cannot change without rewriting way AGS handles these.

Snarky

Quote from: Crimson Wizard on Sat 30/12/2017 15:00:57This is indeed something you cannot change without rewriting way AGS handles these.

... which wouldn't be a bad idea in the long term, I think. But this workaround certainly makes it less pressing. Thanks for the tutorial!

SMF spam blocked by CleanTalk