News for hackers. Stuff that matters.
Re:Doom 3 in WebAssembly by rictic on Thursday January 03, 2019 @06:15PM (#18820316)
Why would it download the 400mb every time you run the game? There are caching and storage APIs in the browser. It's possible that there are some more controls needed for both the user and the site author over this storage space, but that's definitely not a fundamental impediment.
Re:Doom 3 in WebAssembly by tracker1 on Thursday January 03, 2019 @07:11PM (#18820731)
I'm unsure if browsers will cache 400mb from a single site in a single file. Also, where are you going to cache it... all of said APIs would have to request to expand local storage interface... which may not be bad.
Re:Doom 3 in WebAssembly by Klathmon on Thursday January 03, 2019 @07:53PM (#18821020)
indexedDB can easily store gigabytes of data without issue. I've personally used it to do so before, and it will happily "cache" it for weeks at a time. There are several web apps which work entirely offline and cache all of their data using that API.

devdocs.io is one of them.

Like the parent commenter said, i'd welcome more control over the storage of that data, but it absolutely can and will cache large blobs like that.

Re:Doom 3 in WebAssembly by Gab_CV on Friday January 04, 2019 @08:20AM (#18823759)
Actually, indexedDB is used to cache/store the whole .pk4, but using small chunks of data (50MB or so). This works well in practice.

The best would be that all browsers support the Chrome Filesystem API, but that's not for now

Re:Doom 3 in WebAssembly by Klathmon on Friday January 04, 2019 @08:44AM (#18823950)
Thats cool! Any reason you do it in multiple distinct chunks vs mutating a single chunk?

I'm assuming the time required to store and request a massive blob gets excessive at some point, but were there any other reasons?

Re:Doom 3 in WebAssembly by Gab_CV on Friday January 04, 2019 @03:17PM (#18827255)
It is because IndexedDB maximum row size is not that big, and depends on the browsers
Re:Doom 3 in WebAssembly by Klathmon on Friday January 04, 2019 @03:38PM (#18827390)
Wow I had no idea! I'll have to look into that, thanks!