-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emscripten: mark assets used in the loading map as important #562
Comments
If done correctly, this should use some emscripten magic: For the files needed when changing the Map, main loop blockers can be used. However, this needs parsing the entire Map for appropriate files (maybe just the large ones...for example Music?) This should not affect the async stuff much, as the loading functions may look for files in the virtual filesystem first, before actually downloading ( |
Are you still unhappy about the async loading strategy or can that be closed? |
This one could be deferred IMO. As carstene1ns pointed, critical files could be preloaded, e.g. for "The Sacred Tears: TRUE" picture based cutscene or the "+13" animation in "Desolate City". |
The only direct improvement I see for map changes is to declare all files directly required when the map loads as important so that the transition looks better (without stuff popping in). |
Another hacky but simple approach to achieve faster asset loading without messing with Player code:
Most browsers have prefetching enabled by default, except those not wanting to prefetch content (e.g. for privacy reasons or bandwidth savings). |
Sounds very reasonable, I want to add a few things to consider about.
|
For the first point, a simplest and fine tuned approach would be editing the generated json file by hand if needed, instead of adding sophisticated priority heuristics. About preloading JSON assets before Player WASM binary, makes sense, it could start loading before the large binary to make the asset loading experience smoother, defining a javascript code (inline or external script loaded from the header) the index.html. |
Firefox 85 released on January 26th, introducing full |
Have some simple idea to solve it: The Web Player could look for a "preload.zip" file on startup in the game directory. This zip is extracted into the game directory and everything that was in there is obviously not downlaoded again. Problem: The game author is responsible for this, but when you look at "nico" they are already doing this anyway to make there game web-compatible. And our streaming solution works for 99% of the RPG Maker games already. Only problem are "fast" scenes. Do not want to cause lots of extra bandwidth by downloading everything on a map, even stuff that is never visible. Waste of traffic. ZIP reading is already available in the ZIP VFS. Extracting could be done by our ZIP handler. (Want to avoid something like a "OverlayFS", another source of errors) |
Hi, the yno project uses a collection of preload JSON files to deal with files that must be loaded in order to not break animations or so: |
afaik the preloader does not preload anymore since the last Player update xD |
Before having an async file implementation, static data preloading was a big file. The problem of this was not just a huge loading time: browser is not caching large files and a page refresh needed to download the whole game data again.
Current async implementation is loading files on demand in the moment they are called. This allows to cache files apart of fast loading but makes the game display/hear the file a bit more later than it should, most noticeable on slow connections, degrading the game user experience.
To prevent this, files should be loaded enough time before by preloading them in some way.
The text was updated successfully, but these errors were encountered: