Our publisher asked us to improve the loading time of our game. Their dev has a good talk about its importance for players who run your game for the first time.
Defold packs all the game resources into a large package for the HTML5 platform, and all these files have to be downloaded before startup.
Defold has the Live Update feature, which we can use to split resources into two parts: all resources required for the first level of your game plus the rest of resources. The game can load these resources in the background (and from the same folder) while players are playing the first level.
I made an example project that loads resources from a .zip file using Live Update, and you can use it as a Defold library dependency:
In this project, the demo game loads the level 2 plus required resources from an external .zip file when you tap anywhere on it. I recommend you start loading these extra resources right after your game’s initialisation.
How it looks when implemented in a game: