Adding Method To Convert PlayCanvas Project To Desktop App On Docs


Recently I was attempting to convert my Playcanvas game into a desktop app, and was going throught the documentation on the same. Currently, the documentation only lists Node webkit(NW.js) for this. However, after a bit of research, I found an easier method to do this, since NW.js docs are quite convoluted. My method is this:-

  1. Embed the game in an iframe and then publish the html online using
  2. Download node.js and then install and convert the app using nativefier, which uses Electron to wrap the apps in a single terminal command. It is important to note that the direct published link will not work in nativefier, and thus the htmlsave link obtained from step 1 must be used.

After completing these two steps, one can obtain the desktop version of their Playcanvas project. I feel this method should be added to the documentation since it is easier to understand and execute as compared to NW.js.

I hope this is considered.

That will be impossible to maintain. Should the docs also cover how to use Playcanvas with Vue? Perhaps also how to run it on Arduino? There are simply too many frameworks and use cases out there. It is up to the developer to find the way that matches their needs. Documentation should explain how to use the Playcanvas API and how to use its systems. Anything extra is up to the community, who can create tutorials and guides for one or another framework/toolchain.

Hi @DevilZ,

If the only thing you are looking for is to get the install app pop-up to appear, then the only thing you need is to include a simple manifest.json file to your Playcanvas app (PWA).

Check online what are the minimum properties required to include to that file and it’s as simple as that. I don’t think this is a common scenario to get this included in the docs, but pull requests are always welcome. The documentation site is open source and you can contribute to that:

1 Like

Thanks @Leonidas, will take a look.