Skip to content
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

Add an option to export a HTML5 project as a Progressive Web App #1269

Closed
yhcharles opened this issue Jul 28, 2020 · 5 comments · Fixed by godotengine/godot#48159
Closed

Comments

@yhcharles
Copy link

Describe the project you are working on:
A simple game targeting for web export.

Describe the problem or limitation you are having in your project:
I want to export the project as a PWA app, which can be played offline and "installed" on device for mobile as well as desktop. But it's not supported now. I can add partially support by using html template, but this solution doesn't generalize well. I still need to manually add/change some file after exporting.

Describe the feature / enhancement and how it helps to overcome the problem or limitation:
With official support, web export should be able to automatically generate the manifest.json as well as service_worker.js files, which makes the web export an complete PWA app.

Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
I tried to follow Google's tutorial: https://codelabs.developers.google.com/codelabs/your-first-pwapp/#0 to add PWA support. And here's the commit enabling PWA for my toy project: yhcharles/yhcharles.github.io@22553cb

If this enhancement will not be used often, can it be worked around with a few lines of script?:
It is possible, but still some manual work, and not so convenient.

Is there a reason why this should be core and not an add-on in the asset library?:

@Calinou Calinou changed the title Export as PWA app for web Add an option to export a HTML5 project as a Progressive Web App Jul 28, 2020
@darrinm
Copy link

darrinm commented Aug 12, 2020

Fantastic proposal! It would be great if the open web (HTML5) would be a viable alternative to delivering via walled-garden App Stores. PWAs can be installed, added to home screen and run offline so that goes a long way toward parity.

@Calinou
Copy link
Member

Calinou commented Aug 12, 2020

It would be great if the open web (HTML5) would be a viable alternative to delivering via walled-garden App Stores.

Keep in mind these have completely different performance figures, though. Running HTML5 exports on mobile will never be as smooth as native applications.

@darrinm
Copy link

darrinm commented Aug 12, 2020

Keep in mind these have completely different performance figures, though. Running HTML5 exports on mobile will never be as smooth as native applications.

No doubt. Question is if it is "good enough" for a given application considering the tradeoffs. I'm curious though @Calinou, do you know of any benchmarks or other comparisons specifically regarding Godot Engine? Maybe there are aspects that can be improved.

@archerallstars
Copy link

A very good proposal indeed 💯

With this option, it's not necessary for the players to wait for their favorite title to get ported on their system. It's totally possible to pilot a game/app on as many platforms as possible, then porting to a native later (if there's any demand there).

@Calinou
Copy link
Member

Calinou commented Mar 8, 2021

Note that PWA support was recently added to the HTML5 editor, but it remains to be added for exported projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants