CloseRange
Member
So in my game I have 2 rooms so far: A Menu room and a Play room.
my game uses random generation to create unique rooms for the player making it so i only have to place on object in the room to make it playable.
The problem is that I have made it so that once you reach the end of the room you'll reach a ladder that you can click on and instead of going to a third room it will delete every object in the room (besides the inventory player and controller objects) and remake the room so it appears to be a new "floor" of the game.
I also use this same method when the player dies only instead of deleting everything i just use the function room_restart(); the problem is that when I do that it freezes for about 5-10 seconds then says im out of memory and crashes. I've also tried just going back to the menu but instead of saying no memory it just freezes forever. the only way It works well is if i do Game Restart but I don't want to have to resort to that because I later along the line i might have other rooms appear before the menu room that i don't want to reappear.
Any suggestions on a fix would be great thanks in advance
-CloseRange
my game uses random generation to create unique rooms for the player making it so i only have to place on object in the room to make it playable.
The problem is that I have made it so that once you reach the end of the room you'll reach a ladder that you can click on and instead of going to a third room it will delete every object in the room (besides the inventory player and controller objects) and remake the room so it appears to be a new "floor" of the game.
I also use this same method when the player dies only instead of deleting everything i just use the function room_restart(); the problem is that when I do that it freezes for about 5-10 seconds then says im out of memory and crashes. I've also tried just going back to the menu but instead of saying no memory it just freezes forever. the only way It works well is if i do Game Restart but I don't want to have to resort to that because I later along the line i might have other rooms appear before the menu room that i don't want to reappear.
Any suggestions on a fix would be great thanks in advance
-CloseRange