Change window size at runtime?

Discussion and feedback on Construct 2

Post » Tue Sep 04, 2012 4:36 pm

Is it possible to change the window size at runtime? If not, can this feature please be added?

My level editor and game are in the same project, and I have to keep changing the window size when going from one to the other because the editor is much larger. On top of that, I have to re-export the project with the level editor as the first layout + the larger window size for team members to be able to use it.

You can change the canvas size but it doesn't seem to be the same.Tokinsom2012-09-04 16:40:50
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Post » Wed Sep 05, 2012 3:26 pm

Bump :\
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Post » Wed Sep 05, 2012 6:23 pm

I think most browsers prevent you forcibly setting the browser window size, if that's what you mean. Why not just use fullscreen letterbox mode and scale everything up to full size?
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Wed Sep 05, 2012 7:14 pm

Sorry for any confusion. What I'm looking for is the equivalent to CC's "set display resolution" which alters the "window size" parameter in the project properties. My game's resolution is 256x224 but the level editor is much larger; I can't switch to it during runtime without this feature, nor preview it in C2 without adjusting the window size parameters by hand every time.

I thought "set canvas size" would do the trick but it doesn't work the same as "set display resolution."Tokinsom2012-09-05 19:16:57
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Post » Wed Sep 05, 2012 11:30 pm

'Set canvas size' ought to do the trick, since it changes the WindowWidth and WindowHeight expression as well - what is it not doing that it ought to?
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Wed Sep 05, 2012 11:50 pm

I just noticed the 'Set canvas size' gives me unexpected results when using fullscreen letterbox modes.

Maybe you are using letterbox fullscreen on your project?

Apart from that, set canvas size and unbounded scrolling should do what I think you want.
Scirra Employee
B
129
S
45
G
15
Posts: 705
Reputation: 15,413

Post » Wed Sep 05, 2012 11:59 pm

Whoops, my bad. 'Set canvas size' does work the same as 'set display resolution.' However, I just discovered a bug:

When using 'set canvas size,' with unbounded scrolling enabled, objects on a 0,0 parallax layer don't account for the new resolution - they stay where they are.

Should I post a .capx in the bugs forum?

The first time I tried 'set canvas size,' I was using letterbox integer scaling. That on top of the aforementioned bug made me think 'set canvas size' worked differently than I had expected. Gah, confusing. I will try to do more testing before posting next time :)Tokinsom2012-09-06 00:05:49
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Post » Mon Jul 11, 2016 12:25 am

Hey has this happened to be fixed?
B
41
S
22
G
6
Posts: 87
Reputation: 6,626

Post » Mon Jul 11, 2016 1:24 am

Geez this thread is 4 years old man. Yeah it works now.
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 9 guests