My game is made for generally outputting 256p.
But I would like to add a 240p setting to the game options.

The way I currently have it set up, it scales down the 256p output to 240p, but that looks really ugly.
What I would like to achieve, is just cropping the top 16 pixels to achieve a 240p output.

Any ideas of how to implement this?
Thanks a lot!

  • Got to the Project Settings and set Windows Stretch Mode to Disabled and Aspect to Ignore. Then the game is always at actual size. You can change the window size to whatever you like. However, you will need to adjust the position of the root node in your scene. Because the position will be on the top left corner, so you will have to move it by an offset in code (half the difference between 256P and 240P).

Got to the Project Settings and set Windows Stretch Mode to Disabled and Aspect to Ignore. Then the game is always at actual size. You can change the window size to whatever you like. However, you will need to adjust the position of the root node in your scene. Because the position will be on the top left corner, so you will have to move it by an offset in code (half the difference between 256P and 240P).

Wonderful, thanks a lot for the guidance!

This does not seem to work at runtime. Since it is meant to be an active game setting, and the game uses a setup with various viewports, these changes need to be able to happen on the fly without restarting the game. I'll have to find another way to go about this.

Yes, you can do this on the fly by just changing the window size in code. For example by changing.

OS.window_size = Vector2(640, 480)

If you have a special viewport setup, then you will need to make that a function that can take an argument (the current window size as shown in the above code) and then change the sizing or resolution based on that. But that is game specific, so you will have to figure that out, I don't know what your setup is.