optimization & how often do you save current state of game?

I’m wondering whether should I save state every user move (finished), or maybe every 3-4.

Looking for ways to optimize, because I saw my game after 15-20 minutes is starting to getting my phone pretty hot 

I’m also reading https://docs.coronalabs.com/guide/basics/optimization/index.html, but if you have other suggestions how to test, benchmark or what to do to speed things up - I’d be happy to hear :slight_smile:

I would think this would be dependent on the game. For instance if you’re making a level based game you might only need to save your game ever complete level or after you unlock things. On some more open space games, developers will have save points.

It also depends on how much data you’re saving and method of saving data. The more data you are saving the more taxing it will be to save it. If you’re doing cloud saves, it takes time for network requests to complete where local files are much quicker to save.

Rob

Every edit file take time. Save in one file and try to don’t edit a big file. If you open and write some text on a big file and then save it will take more time. And try to save when the phone isn’t busy (for example save when there is not much animation or heavy calculation)

I would think this would be dependent on the game. For instance if you’re making a level based game you might only need to save your game ever complete level or after you unlock things. On some more open space games, developers will have save points.

It also depends on how much data you’re saving and method of saving data. The more data you are saving the more taxing it will be to save it. If you’re doing cloud saves, it takes time for network requests to complete where local files are much quicker to save.

Rob

Every edit file take time. Save in one file and try to don’t edit a big file. If you open and write some text on a big file and then save it will take more time. And try to save when the phone isn’t busy (for example save when there is not much animation or heavy calculation)