Maintaining proportions with different resolutions

This forum is currently in read-only mode.
From the Asset Store
Adjusting the game screen for different resolutions (Letterbox scale)
  • Hi, I'm designing a game at 1920 x 1080. I made the games display size automatically change to the users screen height and screen width. So other users can play at different resolutions.

    I want to make the games proportions maintain consistency while running at different resolutions.

    Can you help me?

  • You might check this topic as well as this one which seems to contain useful informations related to your question.

    You might also want to make a search in the construct classic forum with keywords maybe more adapted to what you're seeking.

    I hope it helps.

  • I will look at the information you posted. thanks.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Don't know if it is exactly what you mean, but I presented a method some time ago in the old forum that works with a virtual screen. This screen is set to some value (preferably 1920x1080 in your case) and it will always display that 1920x1080, no matter what resolution or ratio the user chooses. Black bars are used on non 16:9 ratios.

    last post in this thread, but the other posts might help as well

  • Thanks Tulamide. This is exactly what I was looking for. I'll try it out.

  • It doesn't seem to be working. I'm probably doing something wrong. As I've only started learning construct.

  • I've corrected the issues and simplified the cap to better see it in action.

    I have to say, you ignored almost every explanation I gave in that post and in the screenshot of the events <img src="smileys/smiley4.gif" border="0" align="middle">

    Never omit brackets when copying events, they serve a purpose: The order of calculations is determined by brackets. Example:

    10 - 4 * 3 = -2

    (10 - 4) * 3 = 18

    I've put them back in.

    The second issue was the missing of an inherited layer with scrollrate and zoomrate set to 0, as mentioned.

    The third issue was a inaccuracy of myself. I didn't show, how the private variable 'pid' is exactly used for the aspect bars.

    In this cap the window is set to 1024x768, while the virtual screen stays at 1920x1080. Your layout size is 1920x1080, too, but you may set it to any size you like.

    F1 switches to fullscreen, F2 switches back to windowed. The fullscreen switch uses the current window size to determine the next best fullscreen size. So it will be 1024x768 fullscreen, presenting a virtual screen of 1920x1080.

    Be aware: This method uses zooming to achieve this. You can't use magicam if you want to use it in your game (magicam also accesses the global zoom, there is currently no relative zoom option in magicam)

  • I'm sorry I tried to follow your explanation. But I completely messed up. <img src="smileys/smiley19.gif" border="0" align="middle" /> Thanks again for taking the time to correct my mistakes.

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