Hi all. I have a lot of item images in my game (near 80+) but I not need all images at the start. So I decided to preload some images for future using:
resources.preloadDir(‘items/’);
But I noticed when I use preload, performance of the game drops from 60 to 20 while preloading running.
I am wondering It is a bug or preloading can be a case of this?
As I read in documentation, preload can be used during the game:
Preloading will only download the necessary resources and will not perform deserialization or initialization. Therefore, it consumes less performance and is suitable for use during the game.
You can also try some texture compression, audio decoding rate reduction, video bitrate reduction, etc. to reduce the size of the resources that need to be loaded. If you are a web game, you can also use gzip to optimize this issue.