How do I load exported html5 game on browser w/o upload

0 favourites
  • 12 posts
From the Asset Store
Create your own wss server and ws server with ssl and without ssl.
  • I'm just wondering if it's possible to load the exported html5 game on the browser without uploading it online? Any trick you can share? Thanks in advance.

  • Yeah, just start the index.html file, and if it gives you warning click okay.

    If you know html you can also disable the warning, open the index file with notepad++ or some other editing program add comments to the code where it checks if game is running or server or not.

  • Yeah, just start the index.html file, and if it gives you warning click okay.

    If you know html you can also disable the warning, open the index file with notepad++ or some other editing program add comments to the code where it checks if game is running or server or not.

    Thanks for the reply brotha, will check this out if it work.

  • imhotep22

    In the index.html file, I didn't see any disable to make it view able offline, so I tried to remove this code, but only firefox is able to load it offline and chrome shows only a black screen. I don't know if I'm doing it right, I'm not an expert with advanced html.

    <script>
    	// Issue a warning if trying to preview an exported project on disk.
    	(function(){
    		// Check for running exported on file protocol
    		if (window.location.protocol.substr(0, 4) === "file")
    		{
    			alert("Exported games won't work until you upload them. (When running on the file:/// protocol, browsers block many features from working for security reasons.)");
    		}
    	})();
    	</script>[/code:3lx6sbv2]
  • This is why we have the nwjs exporter.

  • (function(){

          // Check for running exported on file protocol

          if (window.location.protocol.substr(0, 4) === "file")

          {

             alert("Exported games won't work until you upload them. (When running on the file:/// protocol, browsers block many features from working for security reasons.)");

          }

       })();

    Remove that function to remove the warning thing, and yes probably the game wont work on chrome until exported, but it will work or any other browser like mozila or edge.

  • Why not just preview the game in Construct? That lets you play it without uploading anything

    That error message in exported games is there for a reason, deleting it won't magically fix the game. Generally you can't run games from the file:/// protocol because the browser will block all sub-resource requests (e.g. images, sounds etc).

  • Why not just preview the game in Construct? That lets you play it without uploading anything

    That error message in exported games is there for a reason, deleting it won't magically fix the game. Generally you can't run games from the file:/// protocol because the browser will block all sub-resource requests (e.g. images, sounds etc).

    Ashley

    Thankfully you noticed my post, I will take this opportunity to address this issue about monetizing construct 2 apps. I'm figuring out something to make admob ad work on my game, lately nothing seems to work anymore from any Cordova admob plugins, intel XDK, Cocoon and Phonegap. It seems that it is impossible now to monetize a game created from Construct 2. I hope you guys up there would provide us some sort of a really working regularly updated guide on how to monetize games created from Construct 2.

  • It works only with Edge. I tried with Firefox, even after the checkbox it never starts. How to do?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • HTML5 exports cannot be run from disk. The error is there for a reason.

    Either upload a HTML5 export to the web, use the NW.js desktop exporter, or for testing preview inside Construct.

  • Thanks, I tried it and it seems that all work except there's no sound in the videos playblack :/

  • I noticed it's because of the AAC codec of the MP4. So, I converted the videos to webm and now the desktop version works fine.

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