Maintain Aspect Ratio Script?

Discussion in 'RGSS Script Requests' started by CriticalGames, Oct 2, 2014.

  1. CriticalGames

    CriticalGames Veteran Veteran

    Messages:
    217
    Likes Received:
    61
    Location:
    Australia
    First Language:
    English
    Hi guys,

    One of the big problems with RPG Maker is that when you force it into Full Screen on a modern 16:9 monitor, everything gets very...stretched. And with sprites, this can severely degrade the visual quality.

    I've done some research, and the way to deal with this is to force your graphics card to maintain the aspect ratio. This means that you get black bars on the side of the screen, and the image is simply scaled up rather than stretched. The problem is, most players don't know about this, or how to fix it - and really, it shouldn't be their job anyway. So I was wondering - has there has ever been a script which forces Maintain Aspect Ratio when going into full screen? Would this even be possible?

    This is the most recent topic I've been able to find on the subject, which explains how to do it via your graphics card settings: http://forums.rpgmakerweb.com/index.php?/topic/20904-tired-of-your-full-screen-looking-stretchy/

    I'd really appreciate any info on this topic. Thanks in advance!
     
    #1
  2. Andar

    Andar Veteran Veteran

    Messages:
    28,689
    Likes Received:
    6,596
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    No chance - the program cannot access your graphic driver and therefore no script can change those settings.


    Theoretically it would be possible to change data anywhere by directly accessing windows functions, but you would need to know the memory adresses for those setting. And that adress is different for each graphic card, so you would first need to be able to identify the graphic card, and then look up a list of several thousand cards in existance to find the correct adresses...
     
    #2
  3. CriticalGames

    CriticalGames Veteran Veteran

    Messages:
    217
    Likes Received:
    61
    Location:
    Australia
    First Language:
    English
    Thanks a lot for the explanation. This definitely sounds like a more complicated issue than I thought! It just seems bizarre that we can't do something as simple as have a proper resolution in full screen mode.

    What about circumventing the issue? I know that resolution changing scripts exist (although they increase the size of the game screen, rather than just scaling the image), so could there be a way to fake full screen and incorporate the 'Maintain Aspect Ratio' setting through that? Or for that matter, could a script be created which takes precedence over the graphics driver settings?
     
    #3
  4. Andar

    Andar Veteran Veteran

    Messages:
    28,689
    Likes Received:
    6,596
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    Yes, and that complexity is the reason why the other topic provided screenshots of different drivers - if all cards would have been able to react to the same command, that would not have been needed.


    You cannot make the "maintain aspect ratio" by the resolution scripts directly, but you can ask the player what resolution he wants and then change the game to that resolution - and if a resolution is correctly supported by the monitor, then the graphic card won't stretch.
     
    #4
  5. CriticalGames

    CriticalGames Veteran Veteran

    Messages:
    217
    Likes Received:
    61
    Location:
    Australia
    First Language:
    English
    The problem with using resolution scripts, though, is that it resizes the game rather than simply scaling it. So you don't just get 640x480 scaled up to, say, 1280x960 - instead, the player can now see double the amount of game world. This can cause major performance issues and doesn't work very well with small maps. Or are you referring to something else (I'm thinking of ForeverZer0's script)?

    If anyone else has any ideas, I'd love to hear them. But from what you're saying Andar, it sounds like this is never going to happen. Thanks a lot, though - I really appreciate the explanation!
     
    #5
  6. Andar

    Andar Veteran Veteran

    Messages:
    28,689
    Likes Received:
    6,596
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    #6
  7. CriticalGames

    CriticalGames Veteran Veteran

    Messages:
    217
    Likes Received:
    61
    Location:
    Australia
    First Language:
    English
    Sorry, that's my poor explanation. I can't actually use that particular variant (it's for VX Ace, not XP), but regardless it's doing exactly what I was trying to explain. I don't want the viewport to increase - I just want to scale the standard 640x480 image up.
     
    #7

Share This Page