Multiple images for different resolutions?

New to Defold and interested to know what the approach would be for Defold if doing a simple point & click type adventure game (e.g. example). Questions I guess I have, as I’m looking through doco:

Q1 - Would you typically be creating different images sizes/resolutions for such a game (like with apple mobile app development, 1x, 2x, 3x) so that it then chooses the appropriate resolution? e.g. for small phone versus larger tablet?

Q2 - If not for Q1, what would be the suggested approach/workflow with Defold? Just build and create images for the larger tablets and these would be also used for smaller phones, with automatic scaling (perhaps with the defold camera feature which I’ve noted but not read up on yet).

Q3 - Typically would you just use the editor to easily position images on exact locations, but noting within a specific overall boundary, so key items wouldn’t get cut off for different device sizes? Or is there an easy to use editor feature for laying images out in a “reactive” way without having to jump into code to programmatically position them?

Q4 - For full background image these days is it ok to put full images in re size, as opposed to having to do more work to try to create tiles and a layout approach… (been some years since I looked at this)…

1 Like

Most modern devices run at a pretty high resolution these days, and have a decent amount of processing power so I don’t think resizing in-game assets is as much as a problem as varying aspect ratios on different devices. I could be wrong though, I’m just speaking from my own experience. My last two phones actually have had a higher resolution than my own desktop monitor, for example. As for “reactive” positioning, just as with reactive elements in WebDev you will probably have to approach it the same way - with a lot of trial and error. You could start by getting the screen size and using those values to determine where things need to be positioned based on certain breakpoints or by percentage. I’m not quite sure what you mean in your last question, so I won’t say anything there.

3 Likes

Whether to break up images into smaller chunks (if that’s what you’re asking?) depends on the device. Most/all devices support single images/atlases up to 2048x2048, and many support up to 4096x4096. Relevant (but a touch old) thread: Supporting 4096x4096 textures on different devices

3 Likes