Best way to handle resolution changes?

Hello. I had originally asked about this in "JavaScript questions that don't deserve their own thread", but I suppose this is a more complex question, so I've moved it to this thread (apologies).

When it comes to handling resolution within RMMZ, what is an appropriate way to increase or decrease the game application's resolution? As an example, I've been trying to change a game window from 640px width and 360px height, to 1280px width, and 720px height. This would ideally also scale up/down the graphics appropriately. (Edit: To clarify, I would like to give fixed resolution options, rather than solely rely on the player resizing the window.)

When using window.resizeTo(width, height) with the wanted values, the dimensions end up vastly incorrect, and leaves the game window with black bars. Example: For proper 1280x720 window size, it seems like it needs to be resized to 1924 x 758. However, relatively scaling with resizeBy(width, height) doesn't give those errors, and doesn't require having to add extra width and height, but becomes glitchy. (If you were to accidentally resize the game to a height greater than the monitor size, and resize it back to something smaller, black bars won't disappear.)


EDIT: I've found NRP_GameWindowSize.js, for anyone who wants multiple resolution options.
http://newrpg.seesaa.net/article/475413177.html
I’ve always wondered why the windows simply aren’t scaleable? Start a game at 640x360, and let the user grab the bottom corner or side, and scale to whatever suits their screen. Why are we locked into non-scalable windows?
I’ve always wondered why the windows simply aren’t scaleable? Start a game at 640x360, and let the user grab the bottom corner or side, and scale to whatever suits their screen. Why are we locked into non-scalable windows?
I think RMMZ by default lets the user manually adjust the size of the game window, through the lower hand corners and window sides. Disabling that feature requires adding "resizable": false to the package.json file, iirc.
I think RMMZ by default lets the user manually adjust the size of the game window, through the lower hand corners and window sides. Disabling that feature requires adding "resizable": false to the package.json file, iirc.
It does!! Honestly, I never would've noticed the capability, if you wouldn't have mentioned it! I guess most of the RPG Maker games, and such, that I've played and ran in the past either were from a version that didn't support resizing, or else the game had that option turned off on purpose for some reason or other.

I guess I'm still at the point where I'm still learning something new everyday!


Edit: The fullscreen button works as well -- and that's also something I'm not used to seeing with a lot of games. Are these features something added in MZ, or do a lot of people just manually disable them for whatever reason?
[Removed.]

Original thread: https://forums.rpgmakerweb.com/threads/best-way-to-handle-resolution-changes.138009/