renpy / renpy-build

Build system for the Ren'Py visual novel engine. (The engine itself, not games.)
76 stars 51 forks source link

PWA: additional caching options #53

Closed Vadim-Karpenko closed 1 year ago

Vadim-Karpenko commented 1 year ago

I'm creating this issue to discuss further steps for #51 and https://github.com/renpy/renpy/pull/4126. Here are a few things we can implement, feel free to suggest more:

To implement all this, we probably need to generate a file that will include all project paths for media content during the build, because I don't think that we can access all of them from the frontend side. Maybe there's a way to get it from web assembly directly? @renpytom

renpytom commented 1 year ago

My first inclination is that 'Cache the entire game for offline use' is the right choice. For the other platforms, installing the game means installing all of the media files associated with the game. It think it makes sense to continue that when a PWA is involved - installing the game means installing all the files needed to run the game offline.

Vadim-Karpenko commented 1 year ago

My first inclination is that 'Cache the entire game for offline use' is the right choice. For the other platforms, installing the game means installing all of the media files associated with the game. It think it makes sense to continue that when a PWA is involved - installing the game means installing all the files needed to run the game offline.

Makes sense, but it may cause a significant increase in bandwidth to the server if the amount of users is big, and not everyone will use CDNs to fix it. Maybe we should create an option in the config to let the dev decide? And I think would be nice to give some sort of prompt to ask the user if he'd like to install everything or just core files and download everything else progressively.

renpytom commented 1 year ago

I believe this has been satisified.