Reset scene - will this rest memory?
JamesWE
Member Posts: 19
Hi guys, I have a question about resetting memory -
I've searched the forums but I cant find this exact problem/solution.
Currently I have gameplay in one scene, the game is time-based and at the end of the allotted time (eg 60sec) the game will change to a game-over state (while staying in the same scene). I keep the player in the scene, slide on some info and a restart button. When the restart button is hit, the scene is reset using 'reset scene' behavior.
My question is, will the reset scene behavior clear my memory and prevent a RAM buildup?
I'm wanting to keep everything in the same scene for super quick reload time so the player never feels like there is a break in the flow from play session to play session.
Will this work or is there a better way without changing scene?
Thanks!
I've searched the forums but I cant find this exact problem/solution.
Currently I have gameplay in one scene, the game is time-based and at the end of the allotted time (eg 60sec) the game will change to a game-over state (while staying in the same scene). I keep the player in the scene, slide on some info and a restart button. When the restart button is hit, the scene is reset using 'reset scene' behavior.
My question is, will the reset scene behavior clear my memory and prevent a RAM buildup?
I'm wanting to keep everything in the same scene for super quick reload time so the player never feels like there is a break in the flow from play session to play session.
Will this work or is there a better way without changing scene?
Thanks!
Comments
You could always just reset all of you actor locations and attributes. I do this with my game when the player looses, and it seems to run smoothly. I simply save the X and Y coordinates of each actor into its own attributes, and on a reset attribute, interpolate to their saved location. Of couse I only have around 10 or so actors on each scene, so the performance might drop with more actors.
Just remember that if you don't use reset scene, that you will have to reset all the necessary attributes, (Other than the X and Y coordinates for the actors obviously)