• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Room size increase on room_restart();

J

Jeff Huber

Guest
Hello,

I have a room sized 1366x786 and in it there is an object that when the player collides with it, then the room restarts with room_restart(). Each time the room restarts, I want the room size to keep increasing (the player and portal objects are randomly created in the room). I tried adding 200 to room_width and room_height before I did the room_restart, but this didn't work. I thought I might have to do something with another room before restarting the current room, but I couldn't figure it out and I didn't see a way to create an instance of a room and try and pass it parameters of width and height.

Any help would be most greatly appreciated! :)
 

Binsk

Member
You can't and shouldn't.

Honestly room boundaries are just a formality. You can have things spawn outside a room. You can render the view outside the room. The set room size can be completely ignored. Just program your game to ignore the built-in boundaries and instead pay attention to your own manually defined ones and you are golden.
 

TheouAegis

Member
You have room_set_width() and room_set_height(), but they have to be used outside the targeted room - easily resolved by forcing the player to go to a transition room before restarting the room. Other than main issue is this adjust the room size permanently until the program is closed. So even if you restart the game, the room will stay at the enlarged size. Once you close the program, the room size will default.
 
Top