3
\$\begingroup\$

We're working on an iOS game that we plan on having several content updates for.

It's a story type game with lots of little flags when things have been accomplished and such. There is also an inventory system.

I'm looking for ideas on how to best design a game state save data system that will be resilient to a lot of updates and changes to the game.

\$\endgroup\$
0
\$\begingroup\$

Having never written something similar, grain of salt etc. However, writing for changing systems is what all agile programming should be about - so hopefully I'm not totally useless ;)

I think you'll want to take a full-team meeting and discuss what is known/likely to change over time? Where are your points of variation? This will give you focus on the right bits. E.g. if backgrounds will never change, don't worry about having a smart solution for that. Then adjust the solutions after how you see variation occuring.

Other than that, probably saving only as small and relevant a portion of information as possible will be the most resilient. If you save the state of every flag, you might shoot yourself in the foot when the number changes, where saving only set flags would allow new flags and removing obscure flags more easily. Either way I think just putting in safe-guards and checks early and methodically is a must (and possibly enough of a solution, depending on what you're doing).

\$\endgroup\$
  • \$\begingroup\$ These are some good points. \$\endgroup\$ – Sam Washburn Dec 24 '10 at 21:02
1
\$\begingroup\$

I haven't personally used it. but I've heard good things about Google Protocol Buffers. And it looks like there is an Obj-C port.

\$\endgroup\$
  • \$\begingroup\$ This may be a good solution, but I personally don't like the idea of adding another compiler and data format to manage to the project. \$\endgroup\$ – Sam Washburn Dec 24 '10 at 20:57

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.