0 Favourites

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

  • 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.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • 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.

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