Legacy GM Need help with keeping objects consistent with room size

D

dubas

Guest
I am currently working on a puzzle game and I need to resize the room size so I can scale on devices correctly. I want to make sure that all the objects in the room stay in the middle of the room, but when I change the room height, it only adds space to the bottom of the room, making all the objects move to the top of the room, which I do not want. I was wondering if there was any way to make the room bigger without having to move all the objects in every room to the middle. Thanks!
 
D

dubas

Guest
Make the room big and adjust the views, not the room size.

Tutorial for scalling: https://forum.yoyogames.com/index.php?threads/how-to-properly-scale-your-game.995/
That's what I am trying to do, but the issue is where I make the room big. I don't want to go through 60 levels having to move all the objects in the room back to the center after changing the room size. Is there any way to make the room larger while still keeping the objects in the middle of the room (where I currently have them in a 512x512 room)?
 

NazGhuL

NazTaiL
If you set your room to, let say 3000x3000. To set an object in the middle you:

Code:
x = room_width/2;
y = room_height/2;
Generally, i'm setting a big enough room then adjust view then draw/moves objects acccording to view_xview and view_yview

-edit-
or edit the room size using
room_set_height and room_set_width but: you can change (or set) the height and width of any room in your game except the current one.
 
Top