How do I stop a black screen showing

0 favourites
From the Asset Store
Adjusting the game screen for different resolutions (Letterbox scale)
  • gumshoe2029 When you have a moment I would really appreciate some clarification here:

    1.) You specified you tweaked the manifest file app.manifest and offline.appcache specifically, but what did you tweak specifically? What did you add or take away from each file?

    2.) You specified you had these pointed to the actual files, not to sure if you mean this is what you tweaked in the files in point 1, if so do you mean these two files pointed to the entire library of files for that said game?

    Please can you clarify this for me, it would be greatly appreciated.

  • Hey sorry for the delay. I am only on here once every other day or so.

    On our server, we have the app.manifest and offline.appcache files located in a non-standard location, so when Construct was looking for them in the 'usual' place (which is in the web application root directory), it was unable to find them and simply displayed a black screen. I had to edit the raw html to adjust the symbolic link (the manifest="offline.appcache" on line 2 and href="app.manifest" on line 7) to point to the actual location of those files, which for us is manifest="/webres/offline.appcache" and href="/webres/app.manifest".

    If you use Google Chrome with the Developer Tools running on the Network tab, it will show you if your offline.appcache and app.manifest files are loading properly. If they show up in red in the network tab, then your manifest files are not in the proper location and your game will just load a black screen.

  • Ah many thanks! I will give it a try tomorrow. Thanks for the quick response.

  • gumshoe2029 I tried everything you said in the above and still it kept making more errors the more specifically I pointed certain files to there specific directories. If you could take a look at my exported chrome web store version and try and fix it for me and explain to me what was wrong I would greatly appreciate it, or anyone for that matter. The funny thing is the other day I got a chromebook and quickly coded a basic app on there and it worked perfectly using this tutorial https://developer.chrome.com/apps/first_app so I am thinking it could be more to do with certain .js files in the directory, are they corrupted on export or something hence a construct 2 bug???? Just when I open developer in chrome it displays so many errors whether I minify the scripts or not all pointing mainly to all the javscript files such c2runtime.js etc..... again the exported files are as below:

    http://filebin.ca/29knWKcpywdV/Drops.zip

  • I hosted your game on my server, and it works fine. So, all of your Construct stuff is correct. It is definitely a Chrome Web Store issue.

  • Ah many thanks for that, and it is definitely a chrome web store issue and not something that is created as a bug by construct 2? Any way of getting round this issue, as I got a chromebook laptop and developing and publishing apps on there works fine with almost identical manifest files. I am thinking the javascript files are causing the main issue?

  • I think your background.js is part of the problem. It creates a version of index.html somewhere and all of the manifest file references in the index.html are symbolic links. If the symbolic links, don't work properly it will not be able to find your manifest files, resulting in your black screen.

    One of these days, I should write a tutorial on how to use Amazon Web Services and Apache web server. It makes hosting your own stuff 100x easier.

  • Any idea how to fix the background.js? haha or know where to start at least. I want to publish to chrome web store because it saves me re writing all my games for chrome platform on my chromebook which will take me ages, it seems to be taking me longer to get rid of a black screen, lol.

  • this is all the code thats in background.js

    // Launcher script for Chrome Apps in the Chrome Web Store.

    chrome.app.runtime.onLaunched.addListener(function() {

    chrome.app.window.create("index.html", {

    id: "mainWindow",

    state: "fullscreen"

    });

    });

    Also all the files are here in unminified form so the javascript can be read:

    http://filebin.ca/29mHmTj9L66r/Drops.zip

  • You have to use Chrome Developer tools (Ctrl-Shift-I in Chrome Browser; Network tab) to see where your index.html expects those manifest files to be (manifest.json, appmanifest.json, and offline.appcache) and put them where it looks.

  • I tried this and I can't see anything in the errors that specifies that it is even looking for these files? http://picpaste.com/pics/Untitled_2.1437775286.png

    I can not see anything I need to change in the index.html file and I have no idea why the errors in this image are occurring?

  • You need to be on the Network tab, not Elements. Then once you are on the Network tab, hit F5 (to refresh) and watch and see where it looks for those files. They have to be in the same location as your index.html file.

    It looks like you are facing a cross origin problem also. You have to fix that on the server side by adding the HTTP header: Access-Control-Allow-Origin: *

  • I will be wanting to run this app offline via the chrome web store as well, what do you mean by put: "You have to fix that on the server side by adding the HTTP header: Access-Control-Allow-Origin: " where and what file exactly do I put in this "Access-Control-Allow-Origin"??? When I go into network tab it says nothing about index.html it mainly goes on about c2runtime.js

    At this point I am starting to think I have no idea what I am doing, is it something I am doing or what the construct software is doing? If it is the software can this be fixed do you reckon? Just the whole reason I use Construct 2 is to avoid problems like this as I lack the understanding and knowledge to fix them presently.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • gumshoe2029 hopefully I get to a point where I can resolve this I feel as though I am getting nowhere, lol. :'(

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