Bonsaiheldin Posted April 20, 2018 Share Posted April 20, 2018 Hello there. Reducing the number of files downloaded is important for faster loading browser games because often the number of parallel connections is limited to 2, 4 or 8. So, i was wondering if it could actually work to load all the assets as an archive, extract it afterwards and then let the game grab and assign them. Has anyone experimented with that? Maybe with some magic of the File APIs, somehow? Does that actually work? Regards Quote Link to comment Share on other sites More sharing options...
vamos Posted April 20, 2018 Share Posted April 20, 2018 You can do that, I've used JSZip to do this same thing. No need for the File API as such, you can extract data from the zip as blobs or Uint8 arrays or whatever suits your needs. To be honest it does speed things up a bit, but there may be better ways. For example if you use HTTPS then the client can do batched requests, and that's a big speed up. The big disadvantage of the zip approach is that you can't cache individual files - if you need to change one asset, you need to change (and the client needs to re-download) the whole zip. Bonsaiheldin 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.