Setting screen resolution for NWjs displays black screen

0 favourites
  • 7 posts
From the Asset Store
Adjusting the game screen for different resolutions (Letterbox scale)
  • Problem Description

    When setting a specific sets (or just one) of screen resolution for NWjs, it will display a black screen instead of displaying what it's suppose to display.

    When setting the following (or similar):


    NWjs | Set window width to 500

    NWjs | Set window height to 500

    NWjs | Set window maximum size to 500 x 500

    NWjs | Set window minimum size to 500 x 500

    NWjs | Set window not resizable

    NWjs | Set window title to "TEST"

    It will show this following pop-out only in debug mode:


    Javascript error!

    Uncaught TypeError: Cannot read property 'Window' of undefined http://localhost:50000/NodeWebkit_plugin.js, line 376 (col 6)

    This may be a bug in Construct 2 or a third party plugin or behavior - please report it to the developer following the bug report guidelines. Subsequent errors will be logged to the console.

    Attached Capx

    Description of Capx

    This is a test of the problem, when you launch it, and if it display a black screen then this is the error itself.

    If it displays a text on the screen saying "If you see this..." then you have no errors.

    To get the exact details of the problem (the error pop-out), run it on debug mode.

    Affected Browsers

    • Chrome: No
    • Internet Explorer: No
    • NW.js: Yes

    Operating System

    Windows 10 Home

    Construct 2 Version ID

    Release 221 (64-bit)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • What version of NW.js are you using?

    The latest version is HERE.

    Remeber, the Release Notes for r221 state that you will need to be using NW.js 0.13+.

  • zenox98 I had v0.13.0 beta 4 (Chromium 48), which this one gave the black screen, and pop-out in debug mode.

    Now i have v0.13.0 beta 5 (Chromium 48), which is the one that got released yesterday, no black screen but the pop-out in debug mode is still a thing.

    Also another thing i noticed since now updating to v0.13.0 beta 5 (Chromium 48), if i want to revert to a lower resolution (within in-game, not in the .capx of this post) it doesn't lower the resolution, it only will go to higher resolutions. Another thing is that the width is not the same as it's specified within the code, let's say i put 500 width and 500 height, it should be 500 x 500 right? but what it does it's add a little extra width and add's black bars (depending on the fullscreen in browser, layer and window size of your game), the title of the window as well doesn't change if you assigned it to lets say "TEST", it will be named after your project and the added "(Construct 2 preview)".

  • It is still a beta (but getting better all the time) and so if you've updated your original .capx to reflect the changes, then your report is still valid, and Ashley will be able to investigate when he is able.

    Screenshots and a .capx are always useful when investigating such bugs.

  • Just updated the .capx so it could be 640 x 360 instead of 500 x 500, and also threw in a resolution changer in!

  • Should be fixed in the next build.

  • Thanks Ashley

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