Warning for Android user that updating the application may lead to data loss from the old version of the application?

I am writing a game for Android. When the user completes the level, they can be restarted from the next level if they lose (i.e. I need to store an integer in order to remember at what level they reached). If the application is interrupted during playback, I save the state of the world to disk (this is a complex state in which map and game objects are stored).

I would like my options to open in the future to change my game code and how to save / save the state of the world. However, I have to consider the scenario when the user has an old version of the world state on the phone, because they were in the middle of the game, they update the application, and now the application cannot load the world state.

Having to write code to migrate an old version of data to a new version of data would be painful if I could avoid it. It would be nice if I could somehow ask the user to finish their current game before the update. It can be done? Are there any other options?

I am not going to do this often. I would like to iteratively develop my game, having received early feedback, but it is difficult if I have to fix how the world state will be saved and restored now.

I hope this doesn't seem like a silly question, but on a PC or in the console it’s quite normal to play games that you cannot save during the game, or you can only save levels. I just find Android a bit of a pain here, since you must have a game strategy for all games.

+2
java android mobile
Nov 03 '10 at 1:26
source share
1 answer

You cannot prevent the user from updating the application, and you will not be able to execute any code until your application is installed (or updated).

Quite frankly, data loss due to an update is unacceptable. If you use SQLiteOpenHelper, you automatically get good hooks that will help you during the upgrade process.

I understand that you have a rather complicated savegame setup, but try to keep it as flexible as possible to make it easier to update. There are many methods that will help you with this.

And Android and PC are just completely different - on the PC you sit down and play for hours. On Android, you play very fast and then do something else. Or you play and receive a phone call and are forced to switch from your game.

+1
Nov 03 '10 at 1:33
source share
β€” -



All Articles