Best way to dynamically load assets


Does defold support dynamically loading assets? I intend to use quite a few really hi-res graphics (4k graphics) for my next game (I have to use hi-res since svg isn’t supported), and I would like a better loading system than just a ten-second lag on program launch.

1 Like


Yes! Live update is what you’re looking for:

I used it in an HTML5 game, it worked great. For apps you have to store the content on a server, all explained in the docs above.



Can I self-host instead of using AWS?



Which platform(s) are you targetting?

1 Like


Desktop and mobile (not web, but dealing with large number of massive assets)



For desktop you might be able to store them locally, but not sure if that makes sense. For mobile I believe the only option is AWS.

1 Like


zip isn’t supported on mobile?



You can self host your files on any file server (not just AWS).

Not sure what other users use though. @pkeod @agulev, do you have any suggestions?

1 Like


how do I do that? is there a hidden “other” option in live update?



You export to “.zip” as you mentioned.
Then (regardless of AWS or not), you will need to load these files from a file server. The .zip contains the files that the live update will request later on.

1 Like


You can try it with a local python server, e.g. “python m SimpleHTTPServer”, which will give you a file server (from the current directory), at “http://localhost:8000

1 Like


I think there was a misunderstanding in the original post. @grify is not needing live update features but instead needing to use collection proxies to not load everything at once.

Use Monarch and only reference the atlases you need on the screens they are mentioned on. This makes it easy for general assets, you load between screens.

We have 50+ location backgrounds often in our games, these are loaded and unloaded dynamically with collection proxies too. So max there are 2 loaded at once and they are usually swapped between screens.

What do you mean by 4k graphics? You should know that max texture size matters a lot especially on mobile you should try to keep atlases at least below 2048, but even targeting 1024 is also a good idea. This can be done with texture profiles.