I already looked at: the docs for multiple resolutions and tried the demo, but it didn't help. I'm testing display settings for my game. This is my current project settings:
When I resize my game while fullscreen, it looks like this:
I want the image quality to reduce, but still stretch the image to fill the entire window:
What do you apply the reduced resolution to? The screenshot does not look like a 800x500 window. It could have appeared like that If you shrinked down your GUI, and not the window.
Gawk I used get_viewport().size = Vector2i(854, 480)
. The bottom picture is just copy of the top picture, that I edited in an image editor.
Well the docs say the engine will never change monitor's resolution automatically, so what you get is likely a 1920x1080 fullscreen window with a 854x480 viewport in it. You should be able to print out the sizes of the things and confirm if that is the case.
OS.set_window_size() is probably what you want, and then Stretch Mode Viewport should automatically stretch viewport to whatever window size you set.
By the way, Stretch Mode Viewport means it will render at 1920x1080 anyway, which makes choosing the resolution kind of pointless. Perhaps all you really need is set the project settings correctly and let the engine do its thing.
Gawk OS.set_window_size()
seems to have been replaced with DisplayServer.window_set_size()
.
I can see what you mean about it stretching, the graphics in my game end up the same. It seems like most games, even 2D games like Among Us or Terraria, have an option to lower resolution while fullscreen, so the image quality is reduced while still being stretched to the screensize. Isn't this to increase performance for lower end computers? Does Godot not have a way to do this?
Ec I was wrong, OS.set_window_size() really does little in fullscreen.
Instead, in addition to setting viewports size to reduce resolution, try also setting its size override (logical dimensions) to make it fill the window.
Godot is kind of a training engine I guess, so it tries to hide away some low level primitive aspects. The way it handles resolution is not without its logic though. My point is, to understand and utilize that logic might be more practical than to force it to be like in other engines. You could simply set Stretch Mode to 2d (or whatever it is named in the version you are using) and trust the system to render at its native resolution. It should be perfectly able to, unless your game really really pushes the graphics.
© 2022 - 2024 — McMap. All rights reserved.