I think I just narrowed down the size issue, and it has nothing to do with the code above. Instead, the solution appears to be in the rpg_core.js script (and specifically these two values):
JavaScript:
this._scale = 1;
this._realScale = 1;
In case it helps, they're in the Graphics.initialize function. Setting them to an equal value resizes the game viewport accordingly (in 4K, it should be 3.34 and 1080p at 1.62, and that's before I resolve the fullscreen display matter).
All I need at this point is a means to detect the screen resolution and scale the game in accordance with that. EDIT: Apparently the standard window.screen.width property works for this like anything else, and the detection is now implemented. Once I get the fullscreen mode figured out and finalize the rest then I should be good to go.
EDIT 2: Fullscreen is now finished. After digging around in StackOverflow, MSDN Docs and all kinds of TechNet discussions I finally tumbled upon the following piece of code:
JavaScript:
var ViewManagement = Windows.UI.ViewManagement;
var ApplicationViewWindowingMode = ViewManagement.ApplicationViewWindowingMode;
var ApplicationView = ViewManagement.ApplicationView;
With this added to the MV portion of the project, I then changed the startup processing to run the fullscreen activation off the referenced UWP libraries:
JavaScript:
window.onload = function () {
ApplicationView.preferredLaunchWindowingMode = ApplicationViewWindowingMode.fullScreen;
SceneManager.run(Scene_Boot);
};
Now all that's left is to determine the scaling for each of the standard resolutions the game will support, changing the originally-quoted material from rpg_core.js in the Graphics.initialize function so that the game scales properly for each individual possibility (currently tested up to UHD spec as the Xbox Series X is obviously still a good several months away from the time of this post). And after several more tests and edits, this is ultimately what I came up with:
JavaScript:
if (window.screen.width == 1920) {
this._scale = 1.74;
this._realScale = 1.74;
} else if (window.screen.width == 2715) {
this._scale = 2.44;
this._realScale = 2.44;
} else if (window.screen.width == 3840) {
this._scale = 3.48;
this._realScale = 3.48;
} else {
this._scale = 1;
this._realScale = 1;
}
As a side note, I'm not sure after all this that the material here even belongs in MV deployment anymore with regard for all of the work that went into getting this done, which brings things a bit too close to the implementation side for the original intention. But obviously that's another topic for which I'm short on time (and for the mods to determine as well). I will also be testing against the plugins that I was able to port over (and not all of them did, though at least the important ones are holding up in preliminary results) and will report back with a final analysis once that's complete.