Adding support for different screen sizes to the Magic Link tutorial

Hello @Yor!

So sorry your post was lost in void without an answer. I’ll try my best to help here :wink:

The most related manual would be:

Did you use Defold Orthographic?

Fixed auto should maintain scale of your objects (don’t stretch them), but you may find it too small or too big and cropped, depending on the original screen ratio to your device screen ratio. It really is hard to design game for many different devices.

You can also check advices from this thread:

In Defold, you will need to think in terms of relative positioning and scaling. While you don’t have direct support for dps, you can design your UI and game elements to adjust based on screen size using Lua scripts. For example, calculate object sizes and positions relative to window.get_width() and window.get_height().

Another advice is that, even though the Magic Link tutorial is made using game objects - this game can really be made solely in GUI - and GUI has imho more built-in options to adjust to different screen sizes (layouts, display profiles and you have built-in gui.pick_node(), which will always give you correct node clicked).

If you still have any specific problem let us know - if you could also post a zip with reproduciton it might be really helpful to help you! :wink:

2 Likes