GM:S 1.4 Scaling for Full Screen

Discussion in 'Programming' started by atxgamedesigner, Jul 3, 2016.

  1. Hello,

    All of the games I've made up to this point have utilized the default window size.
    I'm now trying to explore some full screen options to make my games more immersive.

    In the current prototype I'm using, I have a rather large room 10000x10000.
    My view size is 1920x1080, and the port is also 1920x1080.

    In the creation code of the room, I've added:
    window_set_fullscreen(true);

    This creates a nice fullscreen scale of 1920x1080 on my screen, however I'd love to have the view and port size match the native size of the user's display.

    I tried:

    // Get the display size.
    displayW = display_get_width();
    displayY = display_get_height();

    // Set the view to the display size.
    view_wview[0] = displayW;
    view_hview[0] = displayH;

    // Set the port to the display size.
    view_wport[0] = displayW;
    view_hport[0] = displayH;


    This gives me the more accurate full screen I was looking for (without up-scaling).
    However, it still appears in a letterbox format - I have thin black bars on the top and bottom of the screen.

    I'm running GM Studio on a Retina MacBook Pro - so there is a lot of display "real estate" to work with.
    I'd love for my game to look great on anything from 1080p to 4k.

    Any ideas on how I can achieve this?

    I appreciate any help you can lend!
     
  2. jo-thijs

    jo-thijs Member

    Joined:
    Jun 20, 2016
    Posts:
    2,844
    It's been a while since I've dealt with resolution issues.

    I believe you had to resize the application surface as well.
     
  3. RangerX

    RangerX Member

    Joined:
    Jun 20, 2016
    Posts:
    2,587
    What's your global settings right now? If you are in "keep aspect ratio" GameMaker will auto-letterbox your game if need be.
    You can also set it to "full scale" if you want the game to always get stretched over the whole screen.
    And since you'd size your view and port at the same size as the monitor, there shouldn't be stretching.
     
    Last edited: Jul 3, 2016
  4. What exactly would be stretched about the graphics, if I'm setting the view and port to match the display size?

    Disabling the "keep aspect ratio" did the trick, thank you!
    So I'm confused about what aspect ratio its referring to - is it that of the initial view/port size?
    So even though my display is much larger than 1920x1080, its scaling up that ratio as big as it can to fit within my display size?

    Thanks for the clarification!
     
    Last edited by a moderator: Jul 3, 2016
  5. RangerX

    RangerX Member

    Joined:
    Jun 20, 2016
    Posts:
    2,587
    Ok, I made mistake about that screen ratio comment. You will not get stretching if you always size the view and ports same size as the monitor.
    Now what's a screen ratio? Well, different resolutions create different rectangles. Per example, 800x600 resolution is "4:3" screen ratio: 4/3=1,33 same as 800/600 = 1,33
    The most popular screen ratio right now is 16:9 for monitors. (ex: 1920x1080)

    I have a question for you now though. Have you thought about the impact of your scaling method on your game? I talk about this briefly into my scaling tutorial:
    https://forum.yoyogames.com/index.php?threads/how-to-properly-scale-your-game.995/

    - What happen if I play your game with my 4k monitor? This means I would see 3200x1800 of your room at a time!
    - Does seeing more at once make your game easier than planned? Or harder?
    - Each player seeing different things at different resolutions, have you thought they might see a secret room you hid on the side? seeing outside the room because you didn't tile your graphics far enough?
    - How about a player with a huge screen but bad computer? He would see wide with more objects on screen at the same time. How do you know it will perform well like other setups?
    - Different users will have a different experience, it can even influence the mood!

    There's alot of possible impacts to this method rendering your game production more complicated, your testing/debuging wayyyy longer and your game designer harder too. You need to be sure about all of that if you want a game that ends up pro-looking and playing great.
     
    Last edited: Jul 4, 2016
    Petr Skornok likes this.
  6. I had not considered several of the topics you brought up.
    I appreciate you bringing this to my attention.

    The room I'm working with now is 10000x10000 and is the "world map" from there, you can enter other rooms when going inside of caves or buildings.
    I don't think the full screen view would be a problem for the world map, it might actually be pretty cool - however, going inside of caves or buildings would almost be ruined by this.
    It would definitely kill some of the discovery/adventure aspect of going into an unknown area.

    I'll check out your tutorial.
    Thanks!
     
  7. I dont see this "keep aspect ratio" option in my Global Game Settings. v1.4
     
  8. RangerX

    RangerX Member

    Joined:
    Jun 20, 2016
    Posts:
    2,587
    Go in your target's global settings under the "graphic" tab.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice