Black borders in NW.js after export

Report Construct 2 bugs here.

Post » Tue Aug 02, 2016 2:21 pm

Problem Description
This is a follow-up thread from this one: https://www.scirra.com/forum/viewtopic.php?f=152&t=178871&p=1052734#p1052734

The problem is the same; a black border shows up around the game when changing the "Fullscreen in browser" option to "Off", "Letterbox scale" or "Letterbox integer scale" but now it's only AFTER exporting. When previewing in Construct 2 the game shows up perfectly without borders which is the result you would expect.

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", export with NW.js to see the black borders.

Steps to Reproduce Bug
  • Change "Fullscreen in browser" option to "Off", "Letterbox scale" or "Letterbox integer scale".
  • Export the game with NW.js (with only the "Window frame" option selected) and run

Observed Result
There is black borders around the game after export (or shows extra pixels if the Fullscreen option is set to another option).

Expected Result
The game should look the same as when you're previewing in Construct 2 after export.

Affected Browsers
  • NW.js

Operating System and Service Pack
Windows 10
NWJS for Construct 2 v0.16.0

Construct 2 Version ID
r232
B
18
S
4
Posts: 22
Reputation: 994

Post » Thu Aug 04, 2016 2:34 am

Hmm, I may be getting this wrong but it also happens before exporting.
Just resize the NW.js window or maximize it when testing and you'll see the black borders.
I had to research but the letterbox integer scale keeps the aspect ratio.
Maybe you need the letterbox scale instead.

There's an explanation here by @ashley. Not sure it helps you in this matter:
does-anyone-actually-use-letterbox-integer-scale_t93783
B
48
S
13
Posts: 111
Reputation: 3,859

Post » Thu Aug 04, 2016 4:29 pm

Yes but the problem is when you use the letterbox scaling, instead of adding a black border it adds pixels to the size, so the game can't be pixel perfect. This is a huge problem if you make pixel games (not so much for linear sampling).

This was a NW.js problem but they fixed it and Scirra updated the NW.js for Construct 2, it works perfectly inside Construct 2 but after export it's still the same so maybe there's a setting that has to be added to after export as well. I just thought I'd let them know with a bug report.

I want to make a game where you can't resize the window which is why I expect to have no borders.
B
18
S
4
Posts: 22
Reputation: 994


Return to Bugs

Who is online

Users browsing this forum: No registered users and 0 guests