Could anyone help me, how to set auto adjust screen for multi devices?
sorry i’m bad in English.
Hi. While It’s impossible to target all screen resolutions with any game engine, Gdevelop still has some options to help accommodate this.
You can find them in Game Settings > Properties
:
You can leave the “platform default” option in No. 3 for Landscape / Vertical alignment according to the mobile device (the screen rotates accordingly)
For screen ratio adjustment you have to use the option highlighted in No.4. The default is that the Game Window will adjust itself to the Device Screen by changing the width to fit either horizontally, or vertically.
- If you use “Change Width to Fit Screen” this will make horizontal black bars (letterbox) appear.,
- If you use “Change Height to Fit Screen” this will have a similar effect, although this options seems to work worse than the default.
- If you use “No change in game size” the game window will always try to be the size you specify and it will adapt itself to the device screen, but if the screen ratio is non-standard or not similar to your original size ratio, it will probably become distorted.
There is also an action to change the window size from GDevelop events
And there’s an option to stretch or not the game window (viewable area)
There’s also an option to keep the aspect ratio for HTML5 games only when using the full screen action.
Also if you can, read this article using Google Translate to help you understand better how to plan for multiple screen resolutions:
Bottom line, you have to plan your game to use a suitable screen ratio. Usually 16:9 works best for most modern devices, and using the previouly mentioned options will adjust the width for devices with longer ratios such as 21:9 using black bars.
Hope this helps you, but If it doesn’t, keep looking and asking, I’m sure someone else can help you find a better solution to your specific problem. Good luck
Thank you so much dear. I will try.
Thanks. it will really help me for my new game.