I'm making a Mario-Like platformer in Godot, and am going for a N64 style, and I want to lower the resolution of the render, while still having the window being resizable, like in Blender. Is there any way to do this?
Thanks in advance!
Simpler approach is to set "Stretch Mode" (in project settings under Display -> Window -> Stretch) to "Viewport".
With "Stretch Mode" set to "Viewport", the rendered resolution will match the design resolution (in project settings, under Display -> Window -> Size). This may result in enlarged "pixels".
Adjust "Aspect" (in project settings under Display -> Window -> Stretch) to the behavior you want (e.g. "Keep" will keep the aspect ratio, but may introduce black bars, but "Ignore" may use rectangular "pixels").
Refer to the article Multiple resolutions for details.
If you want to change the resolution of the Viewport at runtime, you can do the following:
var root = get_tree().root;
root.size = Vector2(100,100);
Note: store the root in a variable, then edit it. Trying to edit it directly will result in a runtime error. This is a bug.
The following code also works:
$"/root".size = Vector2(100,100);
Which is equivalent to:
get_node("/root").size = Vector2(100,100);
You can also change the size of the window from code like this:
OS.window_size = Vector2(100,100);