0 votes

I am making my first mobile game and I have no idea what resolution to use. Between all the different android phones and ios there are tons of different resolutions to try and cover. Does anyone know what resolution I should use and what settings I should use to try and have it work on all phones? The game is not pixel art it is hand drawn if that helps. Thanks!

Godot version 3.2.1
in Engine by (450 points)

2 Answers

0 votes
Best answer

Everything you need to know is in the Multiple resolutions documentation :)

If you don't know what to do: use a 1280x720 window size in the Project Settings, use the 2d stretch mode, expand stretch aspect and configure your UI nodes' anchors correctly to support multiple aspect ratios.

by (9,370 points)
selected by

Thanks! Will this expand to fit any screen or will I need some code to make it do that?

It will expand to any resolution and aspect ratio automatically (with 2D elements scaled), as long as you configure UI anchors correctly in your Control nodes.

0 votes

Use this resolution:
Width: 600
Height: 270
(this works for most of the phones. But to make your screen adapt to the bezel-less phones, add the following function)

Add this function to your global script :

func SetDisplay():
var viewPort = get_node("/root").get_child(1).get_viewport_rect().size
var camera = get_node("/root").get_child(1).find_node("MainCamera")
print(camera.name)
View_port_scale = 600/viewPort.x
camera.set_zoom(camera.get_zoom()*View_port_scale)
print(camera.zoom)
by (134 points)

If the game is 600 by 270 though, that's much smaller than a phone resolution, so how would it upscale to fit? And would the aspect ratio stay the same?

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.