I am making a 2d side scrolling bike stunting game which has 10 levels. The problem I am facing is that the game gets slower and slower with every level. I mean the longer I play the game the slower it will get. This happens if I am continuously just restarting a level or moving on from one level to the next.
It may very obviously seem that some objects are getting leaked/not getting destroyed, but I have spent days now checking that that’s not the case. Actually I’m using just 1 lua file to load any level. There are seperate lua files for each level which are just required in this 1 lua file.
Any help regarding what steps could I take or any suggestions rearding what could I be missing? Anything else you want me to mention?