Live Unbundler is an extension for Defold that enhances the built-in Live Update system by breaking large archives into smaller, dependency-aware chunks and loading them dynamically at runtime.
14 Likes
Version 2.0
Sync with the production client this reference project mirrors: the runtime module and the packer were brought in line with the shipped implementation.
Media archive model (packer): a collection’s resources are split by kind into separate archives so heavy media downloads and updates independently. Textures go to <collection>_texture / common_texture_<hash> (a .texturec is kept with its .a.texturesetc by shared name stem); sounds go to <collection>_sound / common_sound_<hash> (a .soundc is kept with its .oggc/.opusc/.wavc audio via the resource-graph children edge, 1:N); everything else is the base <collection> / common_<hash>. Textures existed before this release; sounds are new here (see Added).
Added
- Byte-based download progress:
get_download_progress()andget_modules_download_progress(names), each with alow/highper-resolution breakdown. Requires a manifest with the newfile_sizeskey. file_sizesinmanifest.json— compressed.arcd0size per archive, emitted by the packer. Added as a new top-level key so clients built before it existed keep parsingfile_versionsunchanged and simply see size0.- Single-resolution sessions: pass only one of
lowres_server_path/hires_server_path. That resolution becomes the only active one,res_modeis ignored, and the absentmanifest_cacheside staysnil. set_save_cache_key(key)— thesys.savekey for the saved-archives list is now injected beforeinitvia a setter instead of being derived inside the module.set_platform_supported(supported)andset_log_function(fn)runtime setters; logging is level-based (DEBUG..FATAL) and a no-op until a function is set.tools/liveupdate_collections_report.py— self-contained interactive HTML report (collections, archives, per-resolution download sizes, cross-collection overlap explorer, duplicate analysis). Available asmake reportand generated automatically at the end ofmake buildliveupdateres.- Sound archives: the packer gives a collection’s sounds their own archives —
<name>_sound(exclusive) andcommon_sound_<hash>(shared) — mirroring textures. A.soundcis kept together with its compiled audio (.oggc/.opusc/.wavc) in one chunk, following the graphchildrenedge (1:N, no shared stem). The report classifies/colors sound archives; the demo’smusic.collection(an excluded proxy with.wav/.ogg/.opuscomponents) exercises the path end-to-end.
Changed
- Runtime init is now injected-before-init.
init_optionsno longer carrysave_cache_keyordisabled; callset_save_cache_key(...)and, if needed,set_platform_supported(...)beforeinit. Seemain/main.script. manifest.jsonusesdeps+file_versions+file_sizes. The previously documented index-basedcollections+fileslayout (smaller JSON, but a breaking reshape) was dropped in favor of the backward-compatible format the production client requires — extend the manifest only by adding new top-level keys. SeeLIVEUPDATE_ARCHITECTURE.md§7.LIVEUPDATE_ARCHITECTURE.mdrewritten to describe the current manifest format, runtime state/flow, active-resolution handling and progress APIs.README.mdruntime example updated to the setter-based API; added themake reporttarget and the single-resolution note.- Report
classify()now recognizes collection / texture / sound archives under both the suffixed (<id>.collectionc) and bare (<id>) naming, so archives categorize correctly regardless ofLIVEUPDATE_COLLECTION_SUFFIX(previously bare-named demo archives all fell through to “other”). - README gained a “What the packer produces” section describing the texture / sound / common archive layout;
LIVEUPDATE_ARCHITECTURE.md§2 documents the full grouping rules.
Removed
tools/liveupdate_report.pyandtools/liveupdate_report_generator.py— superseded bytools/liveupdate_collections_report.py.
Notes
- Keep the
set_save_cache_key(...)value stable across releases. Changing it orphans existing installs’ saved archives and forces a full re-download. - The module’s public API and file name (
live_unbundler/live_unbundler.lua) are unchanged; only the initialization surface and manifest schema moved.
6 Likes

