, ,

Development: WordPop Preferences

I’ve finally laid the groundwork for the WordPop update. I’ve built the skeleton on top of our proprietary framework. The original WordPop for PocketPC was based on an attempt we made to share a framework between the Palm and PPC versions which was a moderate success. In the end, though, we felt we’d get better performance with separate frameworks and I wrote a new one for Farkle which also got used on Word Monaco. WordPop now gets to join the club.

I’ve been working on the prefs structure lately. The prefs for the original were done in a non-standard way for PPC devices and were susceptible to loss in certain reset situations. Since Farkle, I’ve been better about it and it’s time to fix WordPop. I will also have to write some code to read the old prefs and maintain the Best Words and High Scores after an update. I always feel like I’m corrupting clean code by including poorly written code just to support older versions (even when I’m the author of the ugly stuff, too!). But, even I would be annoyed if I lost the records of my best games, so it’s going in.

Next up, placeholders for all of the different screens in WordPop.

3 replies
  1. mbaker5408
    mbaker5408 says:

    How about a tool that one can download to convert from old to new that way the bad code stays out of the new code and once they use the tool it can either self destruct or be uninstalled???? I’m not a fan if bad code as you speak but maybe this can make the game smarter and better with less chance of issues…..

  2. Todd Sherman
    Todd Sherman says:

    The “bad code” will no longer be used once the preferences are saved to the new format. But the old code needs to be supported the first time the application is run so players do not lose their high score and best words.

  3. Wyatt Webb
    Wyatt Webb says:

    I may have been too vague. The code that reads the old prefs isn’t bad in that it will cause bugs (as Todd mentions, the only time it will ever be used is to read the old prefs on first launch), it just disrupts the aesthetics of the code itself because it was written before I fully understood best practices. It’s like reading a book report you wrote in junior high. Even if you got a good grade, it’s slightly embarrassing to see that there was a time you were a less capable writer. It’s really more of a personal pet peeve that the user will never see.

    Now, if we were discussing poorly written code that was critical to everyday gameplay, we might have a bigger problem. In those scenarios I tend to just rewrite completely. Fortunately, that’s not necessary for the prefs.

Comments are closed.