I’am programming a 2d game using a native resolution of 1920 x 1080.
I’d like to be able to make this game working using lower resolutions.
What do you mean by this? In Godot go to: Project Settings-> Display → Window → Stretch → Mode
Here set the mode to either 2D or Viewport. This will allow the game to be dynamically sized by scaling the window it runs in.
2D: This calculates the polygons inside the screen to fit the screen. works like most 2D engines. (libGDX, Unity etc.)
It is also the only way to really get pixel perfect look on mobile, but will need custom mips.
Viewport: This calculates the size of images on the fly, the same as adjusting the viewport size would. Some data loss happens with this one.
The Godot manual says to use this one with pixel perfect games in the manual, but fail to mention that only works with constant aspect ratios.
Since most Mobiles and Tablets use inconsistent aspect ratios you will need to calibrate the screen ratio first.
To keep aspect ratio just select one of the options under Mode.
Keep_width or Keep_Height will render with a black boarder.
What i’d like to do is to get the game automatically scale down to the current resolution of the screen.
You will make code for this. The Viewport node has what you need.
I hope this answers what you are asking, I don’t understand what you need.
Thank you for your answer.
I’ll try to explain better what I need.
My program resolution is 1920 x 1080 (Full HD).
If I run this program on a computer which can display only a lower resolution (l1600 x 900 for example), only a part of the screen will be visible (the other part is displayed “off screen”).
What I’d like to do is to shrink to resolution of the program automatically to the same the resolution of the computer.
Starfighter | 2018-10-03 16:55
I’m having the exact same problem as Starfighter mentions.
GodotUser | 2019-07-25 14:18
I have the same problem as well
Mike Trevor | 2019-10-21 23:59