I'm using Yanfly's Core Engine plugin and i was wondering if there was a way to dynamically set the game's resolution (the height and width values of the game content) to stretch to the max dimensions of the game window instead of setting it as static values like 1920 x 1080 or 1280 x 720? I'd like to avoid the issue of having a massive black gap around a shrunken map view on offbeat PC resolutions. I have a friend who's laptop has a max default resolution of 1366 x 768 and the game looks fine on my 1080 x 1920 PC but the game maps and content look quite shrunken on his laptop even though the game window is correctly sized.
I am a JavaScript programmer, so if you know any solutions that use that, I'm cool with that or if there's a different way please let me know. Thanks for your time.
I understand that JS code, but where do I inject/add it to make it work? Do I need to create a new plugin using that solution or is there a specific preexisting .js file to add it to?
yes and no, it will depend on how you hack your rmmv projet.
but yes you can made a new js plugin and experiment.
Just don't forget to replace in this case the event
`
document.body.onresize = () => { this.scaleToWindow() };
`
So when nwjs detect a resize, you hack and apply new css setup
Oh i get it now. the engine will see the document.body.onresize and then the arrow function its set equal to will trigger which will trigger the entire block of code? how are the individual functions supposed to trigger without a function call? do the function calls o inside the body of the arrow function? that seems like it might work.... your thoughts?
Oh never mind that above question i just asked. I understand how that code works now. Thanks for your help!
On second thought.... this code you gave me might take some extensive experimenting to get it to work. Is there a currently working solution for this that I can simply "drop in" and have it working right out of the box? My game's release date is on September 30th and I have more work to do on it. I don't really have time to be inventing a custom solution... after the game's demo is released and the full version is closer to deployment status, I'll go back to experimenting with that code.