Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

optimization & how often do you save current state of game?
Started by pajter May 06 2018 11:18 AM

2 replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

pajter

[GLOBAL: userInfoPane.html]
pajter
  • Enthusiast

  • 32 posts
  • Corona SDK

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 :)

 



[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 23,714 posts
  • Corona Staff

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



[TOPIC: post.html]
#3

remiduchalard

[GLOBAL: userInfoPane.html]
remiduchalard
  • Contributor

  • 269 posts
  • Corona SDK

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)




[topic_controls]
[/topic_controls]