Hi all, I'm going to release my first game very soon and am trying and optimize the code before sending to the App Store.
My game is made of 10 levels and I would like to clear the memory and remove all the objects before passing from one level to another. In particular I have a main.lua being the level 1 and then calling level 2. Level 2 calls level 3 and so on.
How do you optimize memory usage? Indexed tables create 10 times the amount of data I need. On the other hand, initializing the same variables level after level is the easiest way but at what cost?
Thanks in advance for your tips.