Can I scale the play window to make it smaller on screen while testing?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By mydoghasworms
:warning: Old Version Published before Godot 3 was released.

Is it possible, in the editor, to make the play screen smaller (i.e. when testing with F5 or F6)?

I am developing a portrait game that should work with 1920x1200 resolution. However, this is taller than the screen I am developing on, so when pressing play, part of the screen is not visible.

I have looked through all the editor settings without joy, and on the project settings there are test_width and test_height options, but these don’t cause the display to scale.

:bust_in_silhouette: Reply From: mydoghasworms

OK, I think I got it.

In the project settings, I set stretch_mode to “viewport” and stretch_aspect to “keep”. (I think I did this for my first test mobile game, come to think of it now).

:bust_in_silhouette: Reply From: jospic

I suggest Resolution Switcher plugin:

https://forum.godotengine.org/6393/update-an-old-plugin-for-2-1-version?show=6393#q6393

-j

:bust_in_silhouette: Reply From: ericdl

If your game window is too large on your development pc, you can make it smaller by resizing the window via OS.set_window_size().

Play with the stretch_mode and stretch_aspect settings in Project Settings->Display to find which setting looks best.

:bust_in_silhouette: Reply From: deaton64

I know this is an old post, but I’ve been trying to get this to work and struggled using the project settings.

To get it to work for me, with a background of 1080 x 1920 in portrait mode, I did the following:

In Project settings/Display/Window - width = 540 Height = 960
Add a script to the base node (if you don’t have one).

In the _ready() function add the line: get_tree().set_screen_stretch(2,1,Vector2(540,960),.5)

This is setting the shrink value in the display settings to .5, which you can’t do in the editor (well not in 3.2.1)

UPDATE: I posted on the Godot features forum and some said, so it like this:

In settings, under Display/Window:
Width: 1080
Height: 1920
Test Width: 540
Test Height: 960
Mode: Viewport
Aspect: Keep
Shrink: 1