Loading game in Chrome

Hey guys,
I need to run my html5 playcanvas game in Chrome from file system, is it possible to do?
When loading resources I keep getting the CORS error:

“Failed to load file://…/config.json:
Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.”

What can I do with my html build to be able to run it?
For my project I need to launch game files locally, so I need to store everything in js/index file
How can I do this for playcanvas build?

Please help -_-

Unfortunately, PlayCanvas apps are expected to be ran from a server. You would need to host your own server to play locally (eg Python simple server).

If you want to distribute it, consider using a HTML5 wrapper.

Hey there!
No, the problem is that I need to launch it from file system. I can’t use server in this case

What HTML5 wrapper could you suggest?

I haven’t used HTML5 wrappers myself. Electron is pretty common for desktops.

1 Like

simplest solution would be using serve