Hello there!
Iv been trying to look this stuff up but cant really find any answers, so i decided to ask here since i know theres plenty of you guys that know the ins and outs of this stuff
So heres my questions…
- Do long string variables affect memory usage? If so do you know more or less how much?
Iv been doing some cleaning on my culling script, and i noticed that after saving and loading there was a left over string variable with an ungodly amount of data… and im not exagerating by that, it holds all the data of every object culled, i can fix it by simply reseting the value after its used, but i was wondering just how much memory does a long variable really take… and if i should of been more worried about it.
- Value overflow… well sorta, does having the possability of an ever increasing value gonna break something eventually?
The reason for this one is that im working on the Build Mode of my new game, and just made it so that the player can Rotate the build tiles.
I did this simply by changing the Angle of the tile in use to a new angle of Tile.Angle()+90 or -90.
This works perfect, but i was wondering, what if someone just keeps on rotating the same way and keep adding up, is that gonna cause issues?
…one last question purily out of curiosity…
- I tend to lock my key presses behind a boolean, and most of the time i used a global boolean so that if a key is pressed while changing scenes, no funky stuff happens… the question is: Is there any reason to limit my global variables? or are they just the same as every other kind? As is, does a scene or object variable take up the same memory as a global? that kind of stuff.
Thank you so much for taking the time <3