ResZip: a ready-to-use Lua module and example project on how to use LiveUpdate

Now, about the issues that I faced while implementing this feature.

I didn’t manage to use the resource.store_archive() function as is. It loads the whole ZIP archive at once, but it also requires a manifest, and the new manifest requires a full restart of the game.

That’s why the demo project calls resource.store_resource() just to load resources without a manifest. Moreover, it extracts these resources from a single large ZIP file to avoid slow downloading hundreds of files one by one (I had to use the Miniz library for that).

Another issue is Live Update’s temporary storage of resources in .arcd/.arci files (in IndexedDB). The demo project deletes these files before the start of the game to handle the upgrade of the game. Otherwise, new resources can have the same filenames but different content. The collectionproxy.missing_resources doesn’t know about that, and it loads only new missing resources. The result of this total mess: returning players will not be able to play the game, i.e. it will crash.

To sum up, I would like:

  1. To use resource.store_archive() to load missing resources from a .zip file and without the new manifest plus without the restart of the game.
  2. To be able to disable Live Update’s temporary storage. This case doesn’t need it because a browser already caches all games files, and the game doesn’t use Live Update to upgrade itself.
  3. To easily test an HTML5 debug build from IDE without pre-publishing Live Update content (https://github.com/defold/defold/issues/5593)
  4. To set the output name of Live Update’s .zip file. Also, bob.jar could put it in the bundle output folder.
12 Likes