I’m new to Gdevelop and to game dev in general, and i’m struggling to understand something, how does someone choose the right canvas size and make it fit for all the backgrounds he’s gonna use later, and how does he know if it’s gonna work just fine for other screen sizes as well ?
For example, the background I wanted to use for where the player starts is 1280x368 so I automatically chose the resolution of the canvas to be the same, but then later on when i made the main menu for the game, I’m struggling to keep some stuff in certain places, they would go out of the screen, I tried using the anchor behavior but it didn’t work for some reason, I tried centering the camera in the middle but still it doesn’t work.
Maybe I should use a bigger resolution like 1280x720 and try to make things work from there ?
Please help me as I’m unable to make any progress because of this issue, I don’t know how I’m supposed to think about these things and plan them the right way, I would really appreciate any advice.
Super high level: Unfortunately, You don’t. There is no perfect game resolution.
For more detail: Games designed for 1080p do not scale properly into 1440p. Games designed for 720p DO scale into 1440p correctly, but don’t scale into 1080p correctly.
If you are doing a retro pixel art game, the resolution 320x180 or 640x360 can scale into MOST desktop resolutions.
Note: there are no standards in mobile resolutions at all, even within the same manufacturer they will sometime have a competely different aspect ratio between two screens.
As far as options, if you are looking to do scaling you will need to decide on a resolution and be okay with black bars showing up on screens with different aspect ratios, or potential distortion if it is a non-integer (2x, 3x, etc) resolution scale.
If you don’t do scaling and try to do resolution adjustment, you will need to build out your own logic on how you show/hide assets in your game or deal with zooming.
You can learn more about options that sometimes game devs have done (in general, not GD5 specific) here: Pixel Sharp Graphics at Multiple Screen Resolutions | Dev Blog | Ludicrous Games
Thank you, I use 2 monitors, one is 16:9 and the other is 4:3 I think that’s the problem, the gameplay worked fine on both monitors but the main menu only looked good on the 16:9 one, the the game title was overflowing on the 4:3 one