Need help with setting up background image.

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

How do you know what size background image you need to use, and how do you know what stretch options to use in Project Settings?

I need my background images to not distort on different screen resolutions, and I need to be sure they don’t get cut off. I’d like to make a point and click game, where you pick up items, so I cannot have the screen getting cut off regardless of screen resolution.

Can anyone help me with this?

Thanks

:bust_in_silhouette: Reply From: BauRawson

I think you could work aiming for your ideal resolution/aspect ratio (probably something like 16:9) and in Project Settings > Display > Window > Mode = 2D and Aspect = Keep

Thanks for responding. Does the Full Screen option need to be left unchecked? Is it only for PC games or does it apply to tablets and phones as well?

Jams | 2018-12-04 13:35

Fullscreen is up to you, aspect = keep should do the trick in any way. You can even test this in the editor, use a resizable window and resize it to check.

It should also work for PC and mobile devices as well.

BauRawson | 2018-12-04 13:53

:bust_in_silhouette: Reply From: Jams

I found a working example posted by Chanon at github forums.

Link to post:

Link to sample code:
https://github.com/godotengine/godot/files/1812268/scaleExample2.zip

Link to pixel perfect version of script:
https://forum.godotengine.org/25504/pixel-perfect-scaling?show=26997#a26997