Black borders in NW.js

  • Problem Description

    A black border shows up when previewing with NW.js and after export around the game when changing the "Fullscreen in browser" option to "Off", "Letterbox scale" or "Letterbox integer scale".

    Attach a Capx

    https://www.dropbox.com/s/cfu6s9i89m570 ... rnwjs.capx

    Description of Capx

    The project is a new retro style project with the "Fullscreen in browser" setting changed to "Letterbox integer scale", preview with NW.js or export it to see the black borders.

    Steps to Reproduce Bug

    • Change "Fullscreen in browser" option to "Off", "Letterbox scale" or "Letterbox integer scale".
    • Run the game with NW.js

    Observed Result

    https://www.dropbox.com/s/fnq6pmuctko4y ... result.png

    There is black borders around the game. I've also tried changing the window size with the NW.js object to try and remove the borders manually but they are different in size depending on if it's in preview or after export and even on different computers (only tested on Windows 10 and Windows 7) so it didn't work.

    I've also tried setting it to the other options where you don't get any black borders but then it's not showing up as the correct size and projects with the point sampling becomes blurry (not pixel perfect). The width and height doesn't show up correctly.

    Expected Result

    The window should be the same size as the window width and height in properties (or using the NW.js object) so you don't get any borders around the game.

    Affected Browsers

    • NW.js

    Operating System and Service Pack

    Windows 10

    Construct 2 Version ID

    r230

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

  • I reinstalled it before I tested so the latest version.

  • I have this with nw.js v14.5. Weird. I added the nw.js object and edited the events to show the viewport size and the nw.js window size in the text object. The sizes were the same in both cases. So I print-screened the preview and learned:

    1. The preview window is the same pixel size for both scaling options (at approx 338x190).

    2. The integer scale option renders to the correct canvas size within the nw.js window, whereas the letterbox scale option scales up to fill the full nw.js window (which draws to an incorrect size). Not great if you want to use pixel art.

    I am going to guess that this is a nw.js bug, so it would be best to report it on github.... Sigh, another example of nw.js not being reliable.

  • Looks like this is an NW.js issue that was already reported here: https://github.com/nwjs/nw.js/issues/5093

    Closing as the issue will be followed up from there.

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