I have a game with almost 160 sprites in my resources folder. I need 15 randomly selected sprites on each level (there are 7 levels).
I load those sprites which are required e.g. my random generator scripts generate 15 random numbers (completely unique from previously generated 15 numbers) and based on those number I load the sprites (sprites are numbered from 1-158 so I can easily load them).
My levels take some significant time to load, I think that pre-loading the sprites at the start of each level is taking time. There are actually two folders, one for the questions and another for the answers. Each question has 5 possible answers so I actually load 15 * 5 sprites on each level and save them in an array.
Should I load all the sprites once the game is loaded? Or Should I pre-load all the Sprites in advance?
Thanks in advance I am really looking forward for answers.
NOTE: There are almost thousands of tiles(100px by 100px in size) on each level, I know this also has some impact on performance.