Similar questions were asked several times, but i couldn’t find right answers for my case and i just want to clarify something.
What i want
I want to implement resolution settings for my game. I am already using DefOS for fullscreen, so it also has function to set desired resolution. Basically i want always have fullscreen window with different “quality”, so players can decide what they want: higher resolution or better performance.
What is happening
I’ve been experimenting for a while and come to some results:
When i set width and height in game settings to 1920x1080 and use defos.set_view_size(0, 0, 1920, 1080) everything looks fine. Fullscreen also set via defos:
This time i set defos.set_view_size(0, 0, 1280,720). Width and height in game.settings 1920x1080
Okay, let’t try 4k resolution. Width and height in game settings to 4096x2160 and defos.set_view_size(0, 0, 4096, 2160)
And width and height in game settings to 4096x2160 and defos.set_view_size(0, 0, 1920, 1080)
If you look at logo, you will see the difference: when both in 4k, logo looks more sharp. Both logos were zoomed on the same level.
And the last one: width and height in game settings to 1920x1080 and defos.set_view_size(0, 0, 4096, 2160)
And width and height in game settings to 1920x1080 and defos.set_view_size(0, 0, 1920, 1080)
You can hardly see any difference in quality, but this probably was influenced by original assets quality.
As i correctly understand there is no way to set width and height in game settings during runtime, so i have to stick with 1920x1080.
What i think i should do
Set width and height in game settings to 1920x1080. Let player select resolution and render it to render target with his resolution and then “downscale” or “upscale” it to final render target with 1920x1080.
Am i thinking right or i miss something? I still do not finally understand defold rendering pipeline.