How do I change orientation/canvas size depending on screen

  • Hi! Is it possible to Change the entire size of the game/app depending on the users Screen Resolution? I tried "Set Canvas Size" but it did not work out.

    I want the app to Support Portrait and landscape and it would be great if you could have a different UI on landscape or in General on big Screens. Is this possible?

    (would be nice for my Win8 Project to have a bigger UI and different layout on Windows PC than on WinPhone).

    Maybe with different Layouts? I tried to Change page depending on platform and then Change the canvas size if on Windows 8 but it does not seem to work, its still showing the layout in portrait mode.

  • through the browser object you can check if the game is in portrait or landscape

    Using the viewportleft, viewportright, viewportbottom and viewporttop, you can get the exact size of the game and change things accordingly.

    It's possible to make completely responsive design this way, scaling layers and or exchanging sprites etc. , depending on the different circumstances.

  • I tried to Change the layout/canvas size with "Set Canvas Size" (System) but it does not seem to do anything when I enter different values. It just Shows another part of the layout but the game/app is still the same size in my browser. Any ideas how this works?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm not sure what you are trying to achieve..

    I always tend to use one of the fullscreen-modes and change layer-scale and or sprites, sizes, etcetera according to the size and orientation of the window.

  • LittleStain Could you please explain your last statement

    I always tend to use one of the fullscreen-modes and change layer-scale and or sprites, sizes, etcetera according to the size and orientation of the window.

    As I didn't know what do you mean by sprites sizes or size or orientation ?

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