ios update question

Game Editor comments and discussion.

ios update question

Postby Nykos » Mon May 02, 2011 2:34 pm

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
Nykos
 
Posts: 110
Joined: Sun Dec 19, 2010 11:11 pm
Score: 6 Give a positive score

Re: ios update question

Postby Nykos » Tue May 03, 2011 5:33 pm

anyone?
Nykos
 
Posts: 110
Joined: Sun Dec 19, 2010 11:11 pm
Score: 6 Give a positive score

Re: ios update question

Postby skydereign » Tue May 03, 2011 7:04 pm

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.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: ios update question

Postby Nykos » Tue May 03, 2011 7:44 pm

thanks a lot Sky, i will try it tonight. :D
Nykos
 
Posts: 110
Joined: Sun Dec 19, 2010 11:11 pm
Score: 6 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest