Change window size at runtime?

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

  • Bump :\

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

  • 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."

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

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

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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 :)

  • Hey has this happened to be fixed?

  • Geez this thread is 4 years old man. Yeah it works now.

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