How develop mobile games for different screens in godot

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

i want develop mobile game only problem, different screen sizes and resolution, how to handle these in godot,
it would grt help if someone directs me,
thnks

:bust_in_silhouette: Reply From: VitaZheltyakov

I am use:

configuration.screen_width = get_viewport_rect().size.width
configuration.screen_height = get_viewport_rect().size.height
configuration.aspect_ratio = configuration.screen_width / configuration.screen_height
if (configuration.aspect_ratio < 1) : configuration.scale_ratio = configuration.screen_height / configuration.screen_height_max
else : configuration.scale_ratio = configuration.screen_width / configuration.screen_width_max
get_node("LoadSplash").set_pos(Vector2(configuration.screen_width/2, configuration.screen_height/2))
get_node("LoadSplash").set_scale(Vector2(configuration.scale_ratio, configuration.scale_ratio))
	

thnx VitaZheltyakov for helping me out, what about the assets should be creating for each resolution?

milroy | 2017-02-04 11:00

Your assets should be good. All you need to do is scale down the root node (which always have a viewport in it), and that will scale down your whole screen, assets and all.

For a short demonstration of this, and a shorter method, watch this tutorial:
https://www.youtube.com/watch?v=gylnwemFIZc

rredesigns | 2017-02-04 14:52