Resolution Changer v0.1

Discussion in 'JS Plugin Releases (RMMV)' started by superrogin, Oct 24, 2015.

  1. superrogin

    superrogin Warper Member

    Messages:
    4
    Likes Received:
    6
    First Language:
    Korean
    First of all, i'm not good at english, please understand it :)

    I made a simple resolution changer plugin for RPG MV.

    There might be some bugs, but still it works well!

    Any opinions please  :)

    //=============================================================================// ResolutionChanger.js//=============================================================================/*: * @plugindesc Changing game resolution easily. * @author superrogin * * @param Width * @desc Width of the game screen. * @default 816 * * @param Height * @desc Height of the game screen. * @default 624 * * @help Ask superrogin@gmail.com *//*:ko * @plugindesc ê²ì í´ìë를 ì½ê² ë°ê¿ ì ììµëë¤. * @author superrogin * * @param Width * @desc ê²ì ê°ë¡ í´ìë * @default 816 * * @param Height * @desc ê²ì ì¸ë¡ í´ìë * @default 624 * * @help ì§ë¬¸ : superrogin@gmail.com */(function() { var parameters = PluginManager.parameters('ResolutionChanger'); var wdth = Number(parameters['Width'] || 816); var hght = Number(parameters['Height'] || 624); var _Scene_Base_create = Scene_Base.prototype.create; Scene_Base.prototype.create = function() { _Scene_Base_create.call(this); Graphics.width = wdth; Graphics.height = hght; };})();ResolutionChanger.zip
     

    Attached Files:

    Last edited by a moderator: Oct 24, 2015
    #1
    SilverDash, Hudell and Shaz like this.
  2. Shaz

    Shaz Veteran Veteran

    Messages:
    37,720
    Likes Received:
    11,430
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    Hi, for such a small script, could you please remove the zip file and just put the text into code tags so people don't have to download it? Thanks :)
     
    #2
    superrogin likes this.
  3. superrogin

    superrogin Warper Member

    Messages:
    4
    Likes Received:
    6
    First Language:
    Korean
    My mistake. I'll follow your words, thank you :D
     
    #3
    Shaz likes this.
  4. Prescott

    Prescott argggghhh Veteran

    Messages:
    446
    Likes Received:
    298
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    Are you able to change the resolution of the game in a plugin command with this?
     
    #4
    superrogin likes this.
  5. superrogin

    superrogin Warper Member

    Messages:
    4
    Likes Received:
    6
    First Language:
    Korean
    Just use the script i wrote below, it will be more simple :) but i'll add that function in the next time.Graphics.width = 1280;

    Graphics.height = 720;

    You can change the numbers as you wish.
     
    Last edited by a moderator: Oct 24, 2015
    #5
    Prescott likes this.
  6. Prescott

    Prescott argggghhh Veteran

    Messages:
    446
    Likes Received:
    298
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    THANK YOU SO MUCH THIS IS SO IMPORTANT XD

    EDIT: One question though, if I'm using this and the Yanfly core engine, there will probably be some conflicts, right? How would I go about using the other features of the core engine but still using this to change the resolution? Think I could merge the plugins, maybe? Override the core engine resolution segment with this?
     
    Last edited by a moderator: Oct 25, 2015
    #6
  7. New Display Name

    New Display Name Warper Member

    Messages:
    3
    Likes Received:
    0
    Location:
    Denmark
    First Language:
    English, Danish
    Yanfly's Core Engine allows you to change the resolution of the game already, actually. But try placing this one *after* Yanfly's plugin, if you have any issues.
     
    #7
  8. Shaz

    Shaz Veteran Veteran

    Messages:
    37,720
    Likes Received:
    11,430
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    They may not want to add a whole core script JUST to get a resolution change.
     
    #8
  9. New Display Name

    New Display Name Warper Member

    Messages:
    3
    Likes Received:
    0
    Location:
    Denmark
    First Language:
    English, Danish
     

    Pretty sure he's already got it :)
     
    Last edited by a moderator: Oct 25, 2015
    #9
  10. Prescott

    Prescott argggghhh Veteran

    Messages:
    446
    Likes Received:
    298
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    My question is about changing the resolution of the game if the player wants to, like give them an option to play in 720p or 1080p. Or maybe set it up someway so that it is normally 720p and then goes automatically 1080p when it reads the game is full screen.

    Can Yanfly's already do this using the same method that this one can? Or is it different?
     
    #10
  11. KisaiTenshi

    KisaiTenshi Veteran Veteran

    Messages:
    310
    Likes Received:
    121
    It is, but isn't.

    Basically the script above only changes the canvas "stage" size. Since the html document says "scale to window" it will never actually run at the resolution stated. If you change the size while the game is running, it will only rescale the stage. So when you first load the game windowed it will be at "100%" of whatever resolution is stated.

    If you think far enough ahead, you actually need to ask the player if they want to play full screen and prompt them to restart the game in full screen to get the maximum resolution. However to do this, the game has to be launched full screen which requires setting the package.json file to have

    "fullscreen": true;set, otherwise it will stretch the canvas from the initial size.
     
    #11
    Prescott likes this.
  12. Prescott

    Prescott argggghhh Veteran

    Messages:
    446
    Likes Received:
    298
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    Okay. So it is basically impossible for the user to change their resolution in game, correct? That's a shame.

    If I set the resolution to 1080p and they play it in full screen with a 720p monitor/device, it will automatically downsample it though, correct?
     
    #12
  13. KisaiTenshi

    KisaiTenshi Veteran Veteran

    Messages:
    310
    Likes Received:
    121
    Correct as long as their device is aware of it. It likely won't feel playable though.

    I'd suggest trying to develop a game around 720p or 540p (1/4HD) and using 16:9 ratio to scale up, or design the stage to be adaptable to 4:3 and 16:9 and just crop the game differently around the "common" space.
     
    #13
  14. Jecht

    Jecht Veteran Veteran

    Messages:
    44
    Likes Received:
    24
    First Language:
    Italian
    I'm working on a script that resize the screen to the resolution monitor and it's feel playable

    http://forums.rpgmakerweb.com/index.php?/topic/48030-bodkaa-screenfit/
     
    Last edited by a moderator: Oct 29, 2015
    #14

Share This Page