re nick’s 3) and xedur’s 2): a “foundational” piece that’s missing is the ability to change content dimensions at runtime.
because once you “get” that content coordinates just define a scaling factor between virtual content pixels and physical device pixels, you’ll realize that IFF you were able to change window size programatically, you might also then want/need to change content dimensions dynamically as well.
granted that simple letterbox-extending will handle the vast majority of use-cases, but it cannot handle them all. this is particularly true when doing “pixel” -type displays where you really want an integer scaling factor. if you go to the trouble of calculating those magic values before run (in config.lua), it’s based on the assumption that device dimensions will remain static*.
* or, at least, not change on more than one axis. fe, as happens with android immersive, which can be accommodated as long as the other axis remains fixed, and one just “extends” – retains same integer scaling factor overall.
as we’re all painfully aware, not all devices are 4:3, 3:2 or 16:9 aspect ratio. and all bets are off with resizable windows.
so if you change the device (aka window) dimensions you may want/need to recalc your content dimensions to again end up with an integer scaling factor. (it really depends on each individual app as to exactly what it’s capable of responding to)
…and, once you’ve pondered that, you might even come up with a desire to be able to change the scaling mode at runtime. (start thinking about drastic aspect ratio changes - where your “portrait” design is now running in a “landscape” window - in one case you might want letterbox to bleed new content space into your “long” axis, but in the other case you might prefer scaleEven to bleed excess space off your “short” axis)
…and, once you’ve pondered that, you might even come up with a desire to be able to change the x/y alignment at runtime.
…and, the ability to programatically set full screen, enable/disable min/max buttons (if still windowed at full screen), etc
basically, everything that you can setup in config.lua would be useful to be able to alter at runtime, in support of being able to change window dimensions at runtime. otherwise, the ability to change window dimensions alone would be a mixed blessing at best.
essentially, if you offer something like:
system.setWindowSize(w,h)
then you need (at least) something like
display.setContentSize(w,h)
to go along with it.
fwiw