Background wallpaper for fullscreen mode

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By 9BitStrider

The game window for the project I’m working on doesn’t exactly fit the 16:9 aspect ratio (Unless you set it to be rotated 90 degrees). I’m learning about viewports as we speak but was wanting anyone’s opinion about how to handle background images that fill the remaining screen. Should I make the wallpaper node the main node with the game window as a viewport? Vice versa? How would you go about this?

:bust_in_silhouette: Reply From: estebanmolca

From what little I understand, the fullscreen mode is simulated, it creates a borderless window that adapts to the resolution of the monitor. If you test your project in the editor at a different resolution than your monitor, when you use fullscreen it will look different. In the project options where you configure fullscreen, last are the options to tell godot what to do with the content when the resolution changes. Try setting stretch / mode to 2d.
If I remember correctly in the manual there is a section explaining how to adapt the game to multiple resolutions.
For the background I would use a texture rect node as the first child of the scene. In its options you can scale your content, center it, keep the aspect ratio, etc.