Setting up a game for patches and updates

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By IKSolver

I read up on .pck files and their uses here, and it seems pretty straightforward for things like DLC or mods, but I’m a bit unclear on how this applies to things like patches and updates.

Say I make a game in Godot and there’s a scene called “enemy.tscn” with a script attached called “enemy.gd”, and it turns out there’s a bug that needs some lines of code to fix. How would I create and apply a .pck file with the fix and apply it to the game? Is there some kind of workflow or setup required to make a game patch-friendly?

Thanks in advance!

:bust_in_silhouette: Reply From: Calinou

To reduce patch download sizes, it’s generally less effort to rely on binary diff systems provided by various platforms such as Steam. Just make sure to export to a PCK file instead of a ZIP archive (since compression will make binary diffs not work well).

Sorry for necro but I kind of don’t understand how such a system works. Apparently looking at the Steamworks documentation it simply slices up game’s contents (in our case the .pck) to 1MB files, and the idea behind it is that if I change x thing in my codebase it only has to update that 1MB file, but were I to add/remove lines of my code or assets, or do any sort of modification wouldn’t that change the file size and thus “offset” the entirety of the assets? So I would have to redownload all those offset 1MB files again? Does Godot .pck include a table of contents?

MEDBVLL | 2023-06-30 10:08