I agree. There is no single one-size-fits-all (pun intended) answer to those questions.
Additionally, dynamic-resizing of desktop windows is an entirely different discussion that does not have a simple answer either.
I’ll assume your game is landscape, because portrait apps displayed on desktops have to be handled with a bit of ingenuity.
To start you off, I suggest using a fixed resolution config.lua file and a simple build.settings file. You can find my starter here:
https://github.com/roaminggamer/RG_FreeStuff/raw/master/AskEd/askEdStarter.zip
(_ Tip: The config.lua and build.settings files in this starter have links at the top to documents you must read. Also read the guides and tutorials._)
DO NOT (unless you hate yourself) start off trying to write a complicated config.lua file with calculations, and variation for different devices. Until you understand what a fixed resolution config.lua file does and how it behaves on various devices you are not going to grasp complex config.lua files.
Finally, there are different elements to consider when it comes to scaling and alignment. Assuming you have a fixed resolution config.lua file (like the one I shared in my starter above), and assuming you are using letterbox scaling:
- Parts of the content will always be visible on all screens (safe).
- Parts of the content will be scaled off the sides or top of the screen for other devices (unsafe).
You want to keep that in mind and determine the left, right, top, bottom, full width, full height, and center <x,y> positions through calculations (SSK does this and provides globals). With this information, you can correctly place interface elements (counters, buttons, etc.)
Game content itself is tricky. You need to account for and understand the safe/unsafe regions and place the important parts of your content accordingly. For full screen worlds, horizontal and vertical scrollers, shooters, etc this is not an issue since you will be implementing a camera that keeps the player/target in focus. For puzzle games, fixed view games, etc. This is more challenging and you must experiment early with different resolution target devices to understand how this works.
Good luck on your journey. You have much learning ahead of you.