Resolution change in NW.js

Discussion and feedback on Construct 2

Post » Wed May 13, 2015 8:41 am

Fullscreen option doesn't actually change the resolution of the screen but renders game in desired resolution and then scales it to fill entire screen.
I'm planning to make game for PC's with NW.js and I'd like to support multiple resolutions.
Is it possible to change screen resolution in C2?
B
55
S
14
G
10
Posts: 287
Reputation: 7,677

Post » Wed May 13, 2015 10:28 am

Last time I checked it was not possible with vanilla C2, a launcher might be a possibility to achieve that, even though that feels cheap
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Wed May 13, 2015 10:55 am

System actions: Set layoutscale (zoom out/in), set canvas size (rendering resolution).

Make sure "full screen rendering" in properties is low quality.

That's the way I know of. @sqiddster is able to do it pretty well!
B
147
S
74
G
20
Posts: 1,786
Reputation: 22,527

Post » Wed May 13, 2015 11:16 am

Like @alspal said.

There's no true fullscreen to be had with NW.js, which is a shame cos it impacts performance somewhat even with the low quality/layout scale trick.
B
39
S
16
G
6
Posts: 542
Reputation: 7,617

Post » Wed May 13, 2015 12:20 pm

It would be cool if Nodewebkit/NWjs could do real fullscreen, I'm surprised we don't have it yet as it's a common feature for games.

Borderless fullscreen is a great option, but wouldn't standard fullscreen be more essential?
B
147
S
74
G
20
Posts: 1,786
Reputation: 22,527

Post » Wed May 13, 2015 12:45 pm

At least in nwjs you can request fullscreen from the browser object without user interaction.
Only problem is I get half fps for a while after going to fullscreen.
If you let the user cancel fs, and then request it, it doesn't seem to hurt the fps then.
Image ImageImage
B
169
S
50
G
169
Posts: 8,286
Reputation: 108,216

Post » Wed May 13, 2015 12:49 pm

Only thing I can think of is using the fullscreen in browser crop option and using the browser plugin expressions browser.screenwidth and browser.screenheight to make some adjustments to layer and or object sizes depending on the size of the screen.

Hud elements would ofcourse have to be placed using either the anchor behaviour or based on viewportleft, viewportright, etcetera
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sat May 16, 2015 8:55 pm

Is there technical possibility to change screen resolution in C2? Maybe via plugin?
B
55
S
14
G
10
Posts: 287
Reputation: 7,677

Post » Sat May 16, 2015 10:16 pm

This might be what you're looking for, if I understood the request correctly.... I would make this into a tutorial but that's not an option at present.

Click on the different colored areas to set the window/canvas resolution (works on nw and chrome). The layout will scale so the same image is displayed, just the quality will change with the resolution. Full screen toggle permits full screen rendering and you can set the full screen upscale quality as well. I learned that upscale quality does not change the quality in nw.... Time for a bug report.

capx (r200+)
A big fan of JavaScript.
B
74
S
20
G
69
Posts: 2,208
Reputation: 43,838

Post » Sat May 16, 2015 10:36 pm

What's the difference between 'real fullscreen' and what we have now? As @alspal said, simply using high quality scaling will make the resolution the same as the screen size.
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,679

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 25 guests