1. Hey! Guest! The 35th GMC Jam will take place between November 28th, 12:00 UTC - December 2nd, 12:00 UTC. Why not join in! Click here to find out more!
    Dismiss Notice

GM:S 1.4 [SOLVED]Resolutions and aspect ratios

Discussion in 'Programming' started by Yoflaines, Jun 14, 2017.

  1. Yoflaines

    Yoflaines Guest

    Hi, I'm currently working on a small project of mine and I've been trying to get the game to scale up to my monistors size. I currently have my views on 640x360(the rooms are a lot bigger). I have some code that does that for me and it works the first time i start the game but I also want to restart the game and whenever I do that(Currently with the "R" key) It becomes weird and makes my views into my screens resolution(1920x1080) rather than keeping it that small size. I don't really care about giving the player the ability to set the reselution by themselves but I still want it to upscale
    Code:
    /// Sets the display
    
    var D_width = display_get_width()
    var D_height = display_get_height()
    
    surface_resize(application_surface,D_width,D_height)
    
    room_set_view(room2,0,true,0,0,D_width,D_height,0,0,D_width,D_height,0,0,0,0,obj_player)
    room_set_view_enabled(room2,true)
    I currently have it in the create event but I've tried to put it in to the step event and its still doing that so. Would be glad to get some help:)
     
  2. jo-thijs

    jo-thijs Member

    Joined:
    Jun 20, 2016
    Posts:
    2,844
    What are you trying to do with these 2 lines exactly?
    Code:
    room_set_view(room2,0,true,0,0,D_width,D_height,0,0,D_width,D_height,0,0,0,0,obj_player)
    room_set_view_enabled(room2,true)
    Do you execute them when you're already inside room2?
     
  3. Yoflaines

    Yoflaines Guest

    Yeh I just realised that they don't do anything and that removing them fixed it for some reason. But I think i tried to use them to set the view to your screens resolutions sizes and that is probably what made the game into my screens resolution after i restarted. This whole post was kinda waist of time cause i never really check in dept what might be wrong.
     

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