Page 1 of 1

ios update question

PostPosted: Mon May 02, 2011 2:34 pm
by Nykos
Hi everyone, I'm finishing my second game and I plan to have some updates of it. But something came to my mind.

My game , for the moment, has 20 levels and uses savegames to unlock levels, and I plan on adding 15/20 levels.

But what I thought is, if i do updates, every gamesaves would be replaced by the savefiles of the update.
So, what can I do not erase user's gamesaves and update the game itself???

Don't know if it's possible but I loose nothing asking.

Nykos

Re: ios update question

PostPosted: Tue May 03, 2011 5:33 pm
by Nykos
anyone?

Re: ios update question

PostPosted: Tue May 03, 2011 7:04 pm
by skydereign
First time I read that I must have read it wrong, so I didn't answer. There are some ways you can do something like this, this being the simplest. Have a variable saveState and put it in the save group. In the view's create actor, do something like this.
Code: Select all
loadVars("saveFile", "savegroup");
if(saveState==0)
{
    // there was no save so create the default
    loadVars("defaultSave", "savegroup");
    saveState=1; // don't need if you create the default save with this set
    saveVars("saveFile", "savegroup");
}


Each release, only add the default save file. That way I believe the other file won't get replaced, and if they have a save you won't destroy it.

Re: ios update question

PostPosted: Tue May 03, 2011 7:44 pm
by Nykos
thanks a lot Sky, i will try it tonight. :D