Pack multiple files into one and then split

350 views Asked by At

I'm developing a mobile game and graphics are heavy, so we cannot put all of them into one image atlas, hence having multiple atlases. We use PreloadQueue to load all of the resources. It results in many hits on our server from each client. There is also some additional time delay when we load every file instead of one big 'data' file.

We guess that it could be better if we could pack all of our atlases into one "data" file and load with PreloadQueue at once. Then unpack/split it and use as we use then currently:

pq.getResult('startscreen');
  1. Is there any way to pack all data into one file?
  2. If yes then wouldn't it hit our clients perfomance as unacking operation can take 2 times more memory and some CPU resources.
1

There are 1 answers

1
Berni On

I would suggest using the following technique outlined on the CreateJS website.

ManifestLoader Class: http://createjs.com/docs/preloadjs/classes/ManifestLoader.html

It allows you to load multiple manifests and use only one preloader. All the load status information can be tracked as well.