|Topic was automatically imported from the old Question2Answer platform.
Hi guys !
I wonder what are the best image sizes so my game work on max devices as possible, including retina devices?
My biggest fear is discover that all images inside project must be reformulated and reimported in the game.
So i’m asking you guys.
For example the parallax: my project is 1920 x 1080, should my scenes have backgrounds with that size or doubled site (because of retina).
Why am i asking that? Because of this video:
This is covered in the FAQ: How should assets be created to handle multiple resolutions and aspect ratios?
Quoting the answer there for posterity:
How should assets be created to handle multiple resolutions and aspect ratios?
This question pops up often and it’s probably thanks to the misunderstanding created by Apple when they originally doubled the resolution of their devices. It made people think that having the same assets in different resolutions was a good idea, so many continued towards that path. That originally worked to a point and only for Apple devices, but then several Android and Apple devices with different resolutions and aspect ratios were created, with a very wide range of sizes and DPIs.
The most common and proper way to achieve this is to, instead, use a single base resolution for the game and only handle different screen aspect ratios. This is mostly needed for 2D, as in 3D it’s just a matter of Camera XFov or YFov.
- Choose a single base resolution for your game. Even if there are devices that go up to 2K and devices that go down to 400p, regular hardware scaling in your device will take care of this at little or no performance cost. Most common choices are either near 1080p (1920x1080) or 720p (1280x720). Keep in mind the higher the resolution, the larger your assets, the more memory they will take and the longer the time it will take for loading.
- Use the stretch options in Godot; 2D stretching while keeping aspect ratios works best. Check the Multiple resolutions tutorial on how to achieve this.
- Determine a minimum resolution and then decide if you want your game to stretch vertically or horizontally for different aspect ratios, or if there is one aspect ratio and you want black bars to appear instead. This is also explained in Multiple resolutions.
- For user interfaces, use the anchoring to determine where controls should stay and move. If UIs are more complex, consider learning about Containers.
And that’s it! Your game should work in multiple resolutions.
If there is a desire to make your game also work on ancient devices with tiny screens (fewer than 300 pixels in width), you can use the export option to shrink images, and set that build to be used for certain screen sizes in the App Store or Google Play.