Legacy GM [SOLVED]Resolutions and aspect ratios

Y

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:)
 

jo-thijs

Member
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:)
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?
 
Y

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.
 
Top