[For a commercial game] Game resolution based on desktop resolution

I would like a plugin that would have my game automatically set a resolution based on the user's desktop resolution. I would like for it to be ratio based.

So if the user's resolution is to one of 4:3 ratio, the game would automatically resize itself to the 4:3 resolution I specified.

The ratios I am aiming to set resolutions for are:

4:3

16:9

and the new 21:9 (ultra-wide) ratio.

 
Although not using aspect ratio, you might find this plugin useful: https://github.com/procraftynation/RMV/blob/master/DEX_AutoScreenResolution

Beware of small screen resolutions though, it compacts the UI and will make it hard to view.
Because of the way I have the game set up to use a resolution height of 720, that plugin will not work for me.

This means for the following ratios:

4:3 - 960x720

16:9 - 1280x720

21:9 - Not sure what this one would be.

So if the user's desktop resolution is 1920x1080 then the 16:9 resolution I specified would be chosen. 
Because of the way I have the game set up to use a resolution height of 720, that plugin will not work for me.

This means for the following ratios:

4:3 - 960x720

16:9 - 1280x720

21:9 - Not sure what this one would be.

So if the user's desktop resolution is 1920x1080 then the 16:9 resolution I specified would be chosen. 
Here you go! https://github.com/procraftynation/RMV/blob/master/DEX_SwitchResoByRatio.js

Set the resolutions in the plugin manager 🙂
Here you go! https://github.com/procraftynation/RMV/blob/master/DEX_SwitchResoByRatio.js

Set the resolutions in the plugin manager 🙂
Thanks works like a charm! The only resolution I wasn't able to test was the 21:9 one as I don't have a 21:9 monitor. Now can I ask for a small edit? I'd like 8:5 (sometimes incorrectly referred to as 16:10) added in.

Please? 
Thanks works like a charm! The only resolution I wasn't able to test was the 21:9 one as I don't have a 21:9 monitor. Now can I ask for a small edit? I'd like 8:5 (sometimes incorrectly referred to as 16:10) added in.

Please? 
Sorry just now. I have been very busy the whole week. I've updated the plugin file to include 8:5 🙂
Sorry just now. I have been very busy the whole week. I've updated the plugin file to include 8:5 🙂
Thanks! I'll be sure to put you in the game's credits and give you a free copy before or on release. Don't expect it anytime soon though. I've been working on it for months and I'm not even 25% done yet.
Thanks! I'll be sure to put you in the game's credits and give you a free copy before or on release. Don't expect it anytime soon though. I've been working on it for months and I'm not even 25% done yet.
You're welcome! Sure thing, thanks! 🙂

Original thread: https://forums.rpgmakerweb.com/threads/for-a-commercial-game-game-resolution-based-on-desktop-resolution.54553/