How to avoid that the Renpy developer variable viewer gets flooded with (temporary used) variables? When do variables get deleted? Can somebody explain the stores of renpy to me?
The more I work on my game I realized that when I check the variables (Shift+ D > Variable Viewer) I see many variables which are only used for some very specific proposes. For example when the player has the options to knock on a closed room door or enter it I let him knock three times - and for that I use a variable in a label like that:
label closed_door:
$ knocking_counter = 0
So now I see this variable in the variable viewer although the player is not in front of the closed door anymore. At first I was confused because I explained "labels" to myself being like "functions" and functions / method have a local scope... I didn't expect this variable to be set globally but for a framework like Renpy this makes totally sense.
But now I wonder how I should handle variables which have no global usage. I don't want to see these variables in the viewer nor I like to have the RAM or whatever be filled with useless data.
I realized that there are some kind of stores but I did not get yet how these works. I've created my own classes which hold much game data but I'd like to avoid write some custom logic to handle temporary variables. Do you have any tip for me?