0 votes

I'm trying to implement an option to change the resolution of the game, and I can't find a solution for how to do it anywhere. I just want to change the resolution, like if I were to go into project settings and change the window size from there. It seems pretty simple to me but I can't figure it out. I've tried a lot of stuff already and nothing has worked right so far.

Godot version 3.2.3
in Engine by (112 points)

1 Answer

0 votes
by (7,954 points)

This didn't really work for me. It's closer than what I had, but not quite. I want to change the resolution, but keep the window size and size of the game inside the window the same.

I did, it didn't do anything.

Okay what do you mean that shrink doesn't really work for you?

It did change the resolution, but when it did it made the game smaller inside of the window, which isn't what I want. I want it to change the resolution but then scale it to fit the window size.

Is this a 2D game or a 3D game? And can you send me an example image?

It's 3D, but I was testing the resolution changing in a 2D scene. Here's an image of the main scene, and the options scene I was trying to change the resolution in.

Shrink is meant for 3D and not 2D so try shrink on the 3D scene

See discussion in https://github.com/godotengine/godot/issues/14542.

For better usability, I would recommend exposing a rendering scale factor instead of an absolute resolution: https://github.com/godotengine/godot-demo-projects/tree/master/viewport/3d_scaling

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.