Guide to the Godot game engine/Platform specific

When gaming was young, games were rarely designed for multiple systems at once. When that started, people had to check every screen resolution worked. When phones started coming in many different shapes and sizes, this soon became impractical, and even impossible for most of us. Godot has a way to combat this, of course. But screen size is not your only problem.

Stretching the screen Edit

Go to ProjectSettings, and find Display -> Window. Go to the bottom of the area on the right, and under "Stretch", there are 3 settings: Mode, Aspect and Shrink.

Mode About
disabled Deafult. Does not stretch the screen.
2d Only works on 2D, ignores 3D. Streches the 2D world.
viewport Always works. Stretches the picture.
Value About
ignore Simply stretches or shrinks the screen.
keep The image scales, but the aspect ratio never changes. May create black bars around the edge of the screen.
keep_width Height changes freely, width stays same size as the image scales. Aspect ratio never changes.
keep_height Width changes freely, height stays same size as the image scales. Aspect ratio never changes.
expand Scales image to show at minimum of the camera size. May reveal more of the game world vertically if the window is shrank horizontally and vice versa.

As the Shrink value gets bigger, the screen resolution goes down.

Guide to the Godot game engine

Getting started [edit]
What is a node?
Resources and importing
Signals and methods
Your first game
Making it work
Saving and loading
Making it look good
UI skinning
Advanced help
Servers (singletons)
Platform specific
Helpful links
Authors and contributors
Print version

<-- previous back to top next -->