Set Window Size?

0 favourites
  • 2 posts
From the Asset Store
Get Ready for the New Wave of "Bottom Screen" Games!
  • My project settings have a viewport size of 1920 x 1080, and the project maintains that aspect ratio with black borders.

    I can start the game in windowed mode and set it to fullscreen with a key press.

    What I would like is to start it in a 1280x720 window. And when I leave fullscreen, go back to a 1280x720 window, while maintaining the aspect ratio. But I can't find a way to do this. I feel like this should be as simple as:

    Condition: On Start of Layout > Action: Set Window Size to 1280x720

    Condition: On F Pressed

    > Condition: Browser Not Fullscreen :: Action: Request Fullscreen

    > Condition: Browser Fullscreen :: Action: Cancel Fullscreen :: Action: Set Window Size to 1280x720

    Set Canvas Size claims to alter the Window Size project property. In addition to the fact no such property exists, it does not provide the desired result.

    It boggles my mind that a game engine lets me make an imaginary character navigate a non-existent world, and explode on contact with a magical, floating, lightning-charged box... but setting the size of my game window feels like an impossible task.

    If there is an action to set this properly, please share.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think the terms here are a bit confusing. You can't set the browser window size, as that's blocked to prevent websites abusing it to irritate visitors. However you can set Construct's 'viewport size' property, which is what 'Set canvas size' does (another case of not an ideal name for what it does...)

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