Resolution scaling happens automatic?

I wam about to finish my game and will build it. Now I have tons of questions in my head. I am making a game for mobile and when I run my project on windows, it isn’t scaled correctly. For example,


Does it fix it automatically? Do I have to do something? For each phone will it look like the one on the left?

It seems like you need to change projection:

msg.post("@render:", "use_fixed_fit_projection", { near = -1, far = 1 })

More info is available here: The render pipeline in Defold

but it is on windows, not corretc physical size of the phone

You can just change size of the window and check how it will be with different screens size ratio:

Also, you can resize your window from code to test it:

msg.post("@render:", "resize", { width = 853, height = 480 })

Or from the editor

2 Likes