C
Catonator
Guest
I'll get straight to the point: my game has a load of objects with loads of variables I want to save (basically like Hotline Miami, where it saves the weapons, enemy bodies and whatnot). I didn't want to create huge global arrays for this, so instead I set the room_persistent to 1 to save these various objects. Now the issue is this: once I leave the level, the rooms are going to stay in memory. Let's say the player plays multiple levels in a row, which means that the framerate will drop slowly and eventually the game will run out of memory and crash.
I want to set the rooms to not be persistent once I finish the level. How can I set the room persistence to false outside the room which I'm currently in, without leaving the room?
Thanks in advance.
I want to set the rooms to not be persistent once I finish the level. How can I set the room persistence to false outside the room which I'm currently in, without leaving the room?
Thanks in advance.