Managing Saved Games in a Tablet App

So I have one issue I need to “clean up” in my Windows 8 Store app. It involves saving and restoring.

When you start a game of Shadow, it creates a CurrentGame folder.
Every turn, a small data file is written that contains the turn data. This is all of the data needed to show the current turn in the user interface.
If the users saves, a new folder is created under SavedGame (so something like, SavedGame\2014-01- All of the files from CurrentGame are copied to this new folder. If the user is on turn 300, 300 small data files are copied.
If the user restores, the CurrentGame folder is emptied and the contents of the identified SavedGame folder is copied to the CurrentGame folder.

Clearly, copying hundreds of files is problematic.

A better solution would probably be to have all of the turn files in one place and have a single meta-data file that points to the turn files used by the current instance of the game.

Can anyone think of a better solution?

David C.

Couldn’t you just store all of the small files in one larger file, with some sort of delimiter?

It’s so strange writing a bunch of code that all works and then someone says something and you realize the code you wrote is completely idiotic. I have no idea why I wrote individual files now.

I plan to put all of the turn data in one XML file, a NOSQL database, or SQLite.


David C.

The iOS paradigm is “don’t have saving and restoring”, and only have the current game folder. Then add some kind of “chapter selection” - which would make sense for Shadow, since it’s basically totally linear - and that can let you drop back in time.


iOS has a bunch of strange paradigms that make things extremely infuriating. Thankfully, the best apps circumvent them.

The iOS paradigm is “Program termination and relaunch must be invisible to the user.” Saving and restoring are fine as an optional feature.

Heh. I really like this one, tbh. The pick up and play of it is good, but even better is it stops players farming for content by restoring, and a that makes my life a bit easier.


EDIT - Er, this turned into a bit of a rant. Sorry. Using the “rant” tag to avoid derailing thread, which is not even about iOS at all.

[rant]I admit it has one big advantage - switching between apps and often even quitting means you can just come back at any time and it will be mostly where you left off. My issues are with the extension of this paradigm, which is “no file-system available for exploration” (a sentence which I hope is clear; I found myself floundering for words here). I only became comfortable when I downloaded FileApp; iFrotz works around this by exploiting the “you can open e-mail attachments” function (which FileApp also apporpriates); this makes it nigh impossible, as I understand it, for apps to share data, so I am unable to load my game from Sorcery! 1 to Sorcery! 2 without being connected to the Cloud (and I’d love to be able to do that offline. I know it’s only an instant and it’s done, and then I don’t need a WiFi connection to play, but it’s still inconvenient); and worst of all, the iOS is an ideal platform for emulators, but they are stomped on heavily because of the file management that would require. iDosBox springs to mind…[/rant]

Your rant misses some technical points of iOS development, but I don’t think I want to get into them here.

It’s possible that I’m misinformed, yes. I’ll PM you - I’ll take any chance to get properly informed. :slight_smile:

Actually, I think we can solve this, but we haven’t yet had time to squeeze it into the schedule. I don’t know if that makes things better or worse for you knowing that. (That said, honestly, we quite like that the saves are in the cloud because it means we can take a look at them and get a feel for how people found the game. I had no idea how much gold it was possible to finish S2 with.)


It makes things better. :slight_smile: Because it means it’s only a matter of time.

But hey, I think the vast majority of people prefer the cloud (I happen not to). My answer to everything is: make it toggleable. :slight_smile: