GodotModding / godot-mod-loader

A general purpose mod loader for GDScript based Godot Games [3.x/4.x]
https://discord.godotmodding.com
Creative Commons Zero v1.0 Universal
347 stars 26 forks source link

ZIP vs PCK #24

Closed ithinkandicode closed 1 year ago

ithinkandicode commented 1 year ago

This discussion has come up a few times so I've made a proper issue for it. The loader can support either ZIP or PCK, so it's not a decision we need to make in a hurry, but it would still be good to discuss this to completion.

So: What are the cases we can make for publishing as ZIPs vs. PCKs?


ZIP:


PCK:


Based on this, it seems like ZIPs are the most convenient option.

What are the other benefits of using PCKs?

Related: #22

KANAjetzt commented 1 year ago

PCK versus ZIP pack file formats¶ Each format has its upsides and downsides. PCK is the default and recommended format for most use cases, but you may want to use a ZIP archive instead depending on your needs.

PCK format:

Uncompressed format. Larger file size, but faster to read/write.

Not readable and writable using tools normally present on the user's operating system, even though there are third-party tools to extract and create PCK files.

ZIP format:

Compressed format. Smaller file size, but slower to read/write.

Readable and writable using tools normally present on the user's operating system. This can be useful to make modding easier (see also Exporting packs, patches, and mods). _https://docs.godotengine.org/en/stable/tutorials/export/exporting_projects.html#pck-versus-zip-pack-file-formats_

From the docs - so basically file size vs. loading speed.

KANAjetzt commented 1 year ago

Can be packaged via GDScript, whereas ZIPs can't be. So if we develop tooling to package mods, they'll have to be PCK.

This can be circumvented by calling an "external" tool via OS.execute() to zip something inside a godot plugin. This is currently used in the Plugin

The downside with that is, if you use a godot 4 .exe, you ship over 60 MB to zip some files.

ithinkandicode commented 1 year ago

I'm gonna close this for now to declutter the issues. I think we decided to use ZIP, at least for now. It should help with integrations too so I think we're all good here 🤗