Okay so I have a game that goes like this
//this is main.lua local function game() //game is here which contains mainly display objects local function reset() //here i remove all the display objects and cancel timers //and then call the game function again game() end end game()
So basically in reset function I call the game() function again.
But due to this, after a few resets the game becomes slow which I think is because of all functions being pushed on top of one another and no function “returning”. So, is there any solution to what I want to do but without slowing the game?
Thanks