Godot v4.3.stable - Windows 10.0.19045 - Vulkan (Forward+)
Question
My project’s settings:
viewport size: 202x150
stretch → scale: 2
When I run the project, the window is by default set to the original size which is 202x150. It doesn’t scale up with the content to matter which settings I apply. I have read the documentation and tried many settings but none of them worked. The game’s content is perfectly doubled in size, but you don’t understand it unless you resize the window manually which is not ideal for my purpose. any help is appreciated since I’m new.
You can try using different scaling options like Canvas Items which will stretch the items instead of the camera or you can do something different but thats a good way for it to fit different monitor sizes (Will also make it so no black borders are needed/happen but as I said in the post on weird resolutions objects could look elongated and whatnot)
Yes and a tried every thing it said. it stretches the game’s content, not the viewport’s size (or window’s size? idk the terms are so vague in the docs). the only workaround is to make a autoload script and define this inside it:
func _ready() -> void:
# double the window's size
get_viewport().size *= ProjectSettings.get("display/window/stretch/scale")
# center the winodw
get_window().set_position((DisplayServer.screen_get_size() - get_viewport().size) / 2)
works like a charm but is not efficient and also, the purpose of the scale is to do this automatically. we’re supposed to not be left on our own about different resolutions (as the docs say)