26 December 2010

Sweeps

King of Dragon Pass is a big game, and while there’s lots of special purpose code, frequently the same basic idea occurs more than once.

One of the techniques we made extensive use of in 1.0, and I’m using again for 2.0, is the sweep. If you find a bug, you need to be sure it’s not present somewhere else. A global text search can find an awful lot. (Apparently the search tools available today are better than they were 11 years ago, because I’ve found a number of textual issues that slipped through the cracks in the original release.)

We also used a change log — revision control systems tend not to be as visible, and Subversion wasn’t even dreamed of in 1997. So quickly searching (sweeping?) for “sweep” reveals some of what we did in script (OSL) files:
  • news_FF54 found a bug with 0 clan, did sweep on this file for similar predicaments
  • music & qmark sweep
  • Qland -> Dragon Pass
  • exPoint sweep
  • dx sweep
  • testee sweep - add (quester) to test where needed
  • typo sweep
  • +- sweep
  • Music sweep
  • sweep for bob dole-isms in exploration news
  • WhoopBonus/moot sweep
More recently, resolving the bloat issue revealed a problem with cleaning up after some objects. This warranted a sweep, and sure enough, two other screens had a similar issue.

On the flip side, sweeping and finding nothing can give you more confidence that there aren’t hidden bugs.

5 comments:

  1. Well, code duplication _is_ evil :)

    /kgm

    ReplyDelete
  2. Right, but none of this is code duplication. The assumption is that if you spell a word wrong (or misuse it) one place, you may do so the same way elsewhere. “Bob Dole-isms” refers to the US presidential candidate who referred to himself by name. This was a class of bug that would show up in scene or news text.

    And the bug that prompted this post was actually the *omission* of unique code several places.

    ReplyDelete
  3. Can I buy a beta copy that will convert to full copy so I can help test? I loved 1.0 (thought it kicked my butt) am an avid Glorantha fan and also was in the computer game industry for 10 years.

    don@digi-element.com

    ReplyDelete
  4. Hoping to make 2.0 a little easier in various ways.

    There’s no way to sell beta copies — if it’s in the iTunes store, it has to be approved. And there are limits as to how many private betas we can have, which is one reason I’ve been leery of using things like KickStarter.

    ReplyDelete
  5. David, glad to see you are still in action. ;)

    ReplyDelete