How scaling works with change in Orientation.

0 favourites
  • 3 posts
  • i have been trying to work out a way to make my simple match-3 game work in both orientations. After a lot of snags, now the all the assets appear in the right places in both the orientations but for one big problem.

    It turns out that all the balls are much too small in the portrait mode. Why is that? And is there anyway to stop that?

    If it helps, I am using a window size of 960x640 and a layout size of 1140x720. Also, one thing I noticed that in landscape mode, the left side of the screen starts from x=0 but in protrait mode, the screen starts from x=160. If this means anything, I have no idea what that might be.

    So, if anyone can explain what exactly happens when the orientation changes?

  • My window size and layout size are always the same size.

    Portrait mode probably put a 160 pixel wide border around your window.

    It might even be that the screen starts from x=180 because that's the difference between your window size (960) and your layout size (1140).

    Maybe changing them both to the same size helps your problem.

    That's my 2 cents.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • rezagamertag: Thank you so much for your replay. As you suggested, I made the window and layout of the same size and that got rid of the x=180 problem.

    Your suggestion also gave me an idea to use a window/layout size of 1x1 like 640x640 or 960x960. And guess what, the scaling is there but is no longer so obvious.

    Now I am wondering that is it okay to use an unconventional size like 640x640 instead of the standard ones? Or will it mess with my game at a later stage?

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