Centering splash screen backgrounds on ANY screen size

The one aspect of Defold that has me slightly confused is how it uses the Display height/width settings it gets you to configure in under game.project => Display. It feels like what is being asked for is actual screen pixel height and width. And then under Debug => Simulate Resolution you have the option to select from a wide variety of “standard” devices. Discounting anything below iPhone 8 and Samsung Galaxy Note 9 you have display resolutions that run the whole gamut from 375x 664px through to 1242 x 2688 px.

The two issues I need to address correctly at all times are

  1. I would like to have my splash screen background images properly centered on the screen - any screen
  2. I place a number of game objects randomly within the available screen dimensions. Up until now I have been using a game.project => Display size of 900(W) x 1600(H) and using those dimensions to box in my random game object placements. Clearly, that will not work either.

What is the right way of going about things here to stand a fighting chance of having the display appear “right” on any screen?

What you want to do is look into the render script and specifically the projection you’re using.
This way you’ll be able to design against a fixed resolution and the screen will be scaled (and cropped if needed) by the render script.