How do I get my game to work in portrait mode on a Samsung S23 Ultra?

0 favourites
  • 4 posts
From the Asset Store
five golem elements Sprites Sheet.Best for enemy or villain game characters.
  • I have been out of the Construct game for a few years now and diving back in. I am building a portrait mobile game. My resolution is 9:16 at 1080 x 1920. I am using letterbox scale and when I test my app on my Samsung S23 Ultra, I can see black bars top and bottom.

    Pardon my ignorance here. But I thought letterbox scale was meant to scale everything up, even if the resolution is bigger. I've attached a screenshot below.

    I want it to scale up (or down) but retain a portrait aspect ratio. I want those white lines you see (which are walls) to cling to the sides of the viewport (which I am using the anchor behaviour for).

    Some further reading. The S23 Ultra might not be 16:9 resolution. It's apparently 19.3:9, which is a bit higher. This is most likely the culprit. How could I handle this form of scaling resolution, but also accommodate other portrait aspect ratios which are most likely 16:9?

    Thank you in advance for your help.

  • Set full screen mode to Scale Inner or Scale Outer. Then use Anchor behavior on necessary UI or other objects to make sure they fit the display.

    Check out this tutorial: construct.net/en/tutorials/supporting-multiple-screen-17

  • Thank you, Geoff. I did have that initially actually. The problem is my right wall seems to get cut off, despite the fact it is being anchored.

    You can see top, left and bottom are anchored properly. The right wall seems to be just out of view. This is how I am anchoring it.

    I am using scaling inner. So, perhaps I am doing something weird here when I anchor my right wall that isn't obvious, or something else.

    I found someone else describing a similar issue with anchor and scaling here: construct.net/en/forum/construct-2/how-do-i-18/anchor-sprite-top-left-113871

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Okay, so a further update to this. I managed to fix this issue, but I don't understand why I needed to do this.

    On start of layout, I have to set the position of the walls using ViewPort values. Then, having to subtract half the size of the wall. So, ViewPortLeft(0) and so on.

    It's like the anchor behaviour is running too early?

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