Live Update: Custom resource loader

#1

Since I’ve had to play with Live Update recently and @Pkeod opened the subject in his previous post, here’s a related idea:

Say your Live Update content is delivered on the filesystem through an external system (say, a Steam DLC depot or an APK Expansion File). Currently, you’d have to read that file, then use store_resource() to store the resource in Defold’s cache somewhere. This has two undesired side-effects:

  1. The first load, while store_resource() is doing its job, is slow. Interrogation spends about 1-2 minutes on first load unzipping resources from the APK Expansion Files and storing them. Granted, it shows progress while doing it, but it’s still testing the players’ patience.
  2. Doubles the installation size of the game. I’m essentially copying something that already exists on the FS to another place on the FS.

A better way to handle this would be allowing the game to define (through Lua or even better, a native interface, since resource loading, I assume, happens on a separate thread) custom resource loaders.

Or, at least, allowing us to specify a file path (or a path within a zip file, in the case of APK Expansion Files), where to find that particular resource.

4 Likes

#2

Interesting idea. When we initially designed the feature we thought content would always be downloaded from some file server, but you have identified some scenarios we didn’t think of. We’ll discuss this on Monday.

6 Likes

#3

Yeah, interesting case.

Personally, for ease of use and low complexity, I’d choose to be able to mount a new zip file to the file system, just like we do with the main apk.

2 Likes

#4

Created a new ticket: https://github.com/defold/defold/issues/4723

1 Like