Black borders in NW.js

Bugs will be moved here once resolved.

Post » Wed Jul 06, 2016 4:14 pm

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
B
18
S
4
Posts: 22
Reputation: 994

Post » Wed Jul 06, 2016 4:52 pm

What version of NW.js are you using?
If your vision so exceeds your ability, then look to something closer.
Moderator
B
134
S
30
G
84
Posts: 5,386
Reputation: 58,454

Post » Wed Jul 06, 2016 5:34 pm

I reinstalled it before I tested so the latest version.
B
18
S
4
Posts: 22
Reputation: 994

Post » Wed Jul 06, 2016 6:15 pm

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.
A big fan of JavaScript.
B
74
S
20
G
69
Posts: 2,207
Reputation: 43,836

Post » Mon Jul 11, 2016 12:47 pm

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.
Scirra Founder
B
395
S
232
G
88
Posts: 24,371
Reputation: 193,762


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests