How can I programmatically set the screen resolution?

I want to get the screen resolution data and set it programmatically at the beginning of the scene launch. is it possible?

Hi try with this options, go to OTHER ACTIONS-> Game’s window and resolution

1 Like

Please tell me how best to make a mechanism that will select the screen resolution for different devices?

No idea just search in the forum or Google it, I found this

if you dont want to have the screen stretched, give the user settings for aspect ratios.
thats what i have done for görtan. 4:3 for tablets and 3:2 or 16:9 for phones.

i did use the felgo template UlisesFreitas has linked aswell :slight_smile:

still not always perfectly boarderless but everything looks good and is in place.

As mentioned in multiple threads, there is no perfect resolution or magic math that works for every resolution, not in GDevelop, nor in any other engine.

Slash and Ulises’ links are pretty on topic. You can also read about how some released games from other engines have dealt with it here: Pixel Sharp Graphics at Multiple Screen Resolutions | Dev Blog | Ludicrous Games