my company has developed an Android game using Cocos2D-X. Game works quite well except that for some unknown reason, save games keep disappearing. Users report that they play the game for several days, make good progress and then one day they enter and the game starts over, like there is no save game. We have circumvented this a bit with frequent saves to our backend and then if the local save game is missing, we retrieve it from the server, but this still doesn't explain why the save game file is missing in the first place.

This is what we used to implement storing of save games: http://developer.android.com/guide/topics/data/data-storage.html#filesInternal

Did anyone else encounter this kind of problem?

  • \$\begingroup\$ It says that "When the user uninstalls your application, these files are removed.". Perhaps this happens when you update the application as well ? \$\endgroup\$ – dimitris93 Aug 20 '15 at 15:22
  • \$\begingroup\$ @Shiro data shouldn't be deleted on updates it is not a normal behavior \$\endgroup\$ – Arda Kara Aug 20 '15 at 17:46
  • \$\begingroup\$ Are you able to reproduce the issue with local testing? \$\endgroup\$ – ashes999 Aug 20 '15 at 18:31
  • \$\begingroup\$ no, because whatever we do locally, save game is always there and when we ask users there doesnt seem to be a pattern in what they are doing. What puzzles me the most is that the save game should be stored in an area of the phone storage where only our game should be able to access, so it would mean that our game is deleting the save game, or? \$\endgroup\$ – Tomislav G Aug 21 '15 at 9:09
  • \$\begingroup\$ Is there any "reset" functionality in your code? I'm assuming that you're using some sort of dictionary to store this info. Any chance you're resetting whatever data structure you're using? \$\endgroup\$ – 02fentym Aug 24 '15 at 22:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.