How do I Run HTML5 Local? (C3)

0 favourites
  • 9 posts
From the Asset Store
Full game Construct 2 and Construct 3 to post on Google Play
  • Hi!

    I see this for old topic:

    It's a fundamental restriction of browsers. What are you trying to do? Why can't you use NW.js? That is the best answer.

    It's a fundamental restriction of browsers.

    Ashley, how can this limit be circumvented? (C3)

    If you say can not, I will be very surprised!

    There is a lot of software that gives us a local executable HTML5 file!

    With photos and audio and, etc!

    (I need to export game as a html 5 game, and after import it in android studio (webview) )

    Tagged:

  • For yourself you can just start a server with Python.

    For others use Nwjs, or the Windows Wrapper.

    Oddly enough if you upload it you can then install it as a pwa.

  • (I need to export game as a html 5 game, and after import it in android studio (webview) )

    This is what the Cordova setup does for you.

  • The limit of being unable to run projects on the file: protocol cannot be circumvented. It is there for security reasons. However it should not matter. Use the Cordova exporter for Android/iOS, the Windows WebView2/macOS WKWebView/NW.js exporters for desktop, etc. and everything will work. If you still want to test a HTML5 export locally, as mentioned you can use a local web server too.

  • For yourself you can just start a server with Python.

    For others use Nwjs, or the Windows Wrapper.

    Oddly enough if you upload it you can then install it as a pwa.

    Hi newt!

    Thanks for answer!

    I know all of you say, but I only want with double click on index.html the game run!

  • The limit of being unable to run projects on the file: protocol cannot be circumvented. It is there for security reasons. However it should not matter. Use the Cordova exporter for Android/iOS, the Windows WebView2/macOS WKWebView/NW.js exporters for desktop, etc. and everything will work. If you still want to test a HTML5 export locally, as mentioned you can use a local web server too.

    Hi Ashley

    why this limit just for construct?

    and another software create HTML5 file don't have this limit?

  • It's not a limit for Construct, it's a limit built-in to browsers. For security reasons all sub-resource requests on the file: protocol count as cross-origin, as if they came from an entirely different website. Often that means requests fail or security restrictions block features from working.

    Some simple tests or more feature-limited engines might not have any issues, but Construct has a sophisticated engine with a wide range of features, and the browser security restrictions mean it always gets blocked. However as I said it shouldn't matter: if you want something to double-click and run, use a desktop exporter.

  • It's not a limit for Construct, it's a limit built-in to browsers. For security reasons all sub-resource requests on the file: protocol count as cross-origin, as if they came from an entirely different website. Often that means requests fail or security restrictions block features from working.

    Some simple tests or more feature-limited engines might not have any issues, but Construct has a sophisticated engine with a wide range of features, and the browser security restrictions mean it always gets blocked. However as I said it shouldn't matter: if you want something to double-click and run, use a desktop exporter.

    Oh, thanks Ashley!

    you don't have any idea for using games made with construct in android studio?!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Use the Android exporter.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)