开发者

iPhone OS: implementing your own achievements, how do I do it?

I'm working on a game where really the only game part is (at least right now) that the user can unlock achievements as she does various things throughout the game. I have a database that can keep track of certain user actions and record how many times a user does something but I'm having trouble figuring out the best way to architect the app so that I have to do the least amount of work. Kind of suck with the timing because gamecenter is not ready and it seems like openfeint is changing 开发者_运维技巧gears, but maybe I'm wrong. I'd prefer to do everything "in house" if it is not too ridiculous. looking for suggestions.

One of the parts I'm having the most trouble figuring out is how to manage the state of all the achievements. NSuserdefaults vs. core data vs. a flat data file.

Also is there anyway to send a notification if a core data field reaches a certain amount?

Thanks,

Nick


Are you keeping the achievements on the device only, or also on the server? On the device, there is no reason not to use Core Data.

Using Core Data, you could use KVO on your model properties to monitor when certain values reach a new achievements.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜