Local Storage with HTML5 | Javascript

I've been working on a game using HTML5 for a while, and it gets to the point where loading assets on load becomes quite difficult. I used to create patches for games, so it won't be a problem, but I'm not sure how to store the data.

LocalStorage allows for around 5MB of storage, which isn't enough for anything more than the base asset value in a 2D game.

Considering my game is almost 70MB (it's not too big, but definitely not something you want to wait to load every time you open it, especially as a developer) it becomes necessary to use some form of read / write disk storage data. (Game models, music, client code)

Is this possible, and if so, how should I do it? I expect the full size of the game to end at about 220-270MB when we get to the closed beta from Alpha, and so much too much to download every time you check the file validation and update what needs to be updated.

+3


source to share


1 answer


I would try to cache some content in the browser and use IndexDB if possible.



PS: You may be interested in this project too : LargeLocalStorage

+2


source







All Articles