As you may know I’m busily working on a quest mode for MTG Forge where you would start out with a small card pool and you would win more cards. The good news is that I’ve worked on it for about 4 hours today and although I haven’t finished, I’ve made good progress.
The quest mode seems very easy on paper, but when you have to spell out every detail in code, it seems excruciating. Does this method return null or an array of size 0? What if a file cannot be found, what should be done? Is there any way in the universe that this simple method could fail? When you program, you have to answer a million little questions like these.
I programmed a very simple screen that let the user choose from 4 radio buttons to select the difficultly of the quest mode. (The higher the difficulty, the more wins you have to get in order to earn new cards.) Four radio buttons, it seems pretty simple, just see which one is selected and then go on. I forgot to check to see if none of the buttons were selected, so I added a very important “else” clause.
Since I know MTG Forge is a little buggy by design and I never want a player to lose his progress, MTG Forge never erases the old save file. The old save file is renamed something like “questData-10” and a new save file is created. This seems like a pretty good way of providing a safety net.