Dungeons and Dragons, Gary Gygax, and the Problem Domain
Sunday, March 16, 2008   

I played Dungeons & Dragons well into high school.  And I don't mean snazzy graphical incarnations like Neverwinter Nights or D&D Online; I mean the real stuff: funny-looking dice, dogeared character sheets, and more adventure modules than you can shake a stick (or a +2 enchanted Quarterstaff) at: 

So it was with some dismay that I read about the death last week of Gary Gygax, creator of the Dungeons and Dragons franchise.

Oddly shaped dice. Beards and ruddy cheeks and negligent haircuts and the unmistakable crackling wheeze of nerd laughter. Things that are not as they seem: doors which become maws, buildings which involute or intussuscept upon themselves; words such as "involute" and "intussuscept", and names such as Snarxx and Halabrakorn and The Great God H'w'whiffttt't. And girls. Girls with insolent eyes and thighs of steel and engulfing breasts and tempestuous manes of hair. Sometimes they were monsters; but aren't they all?

This is the legacy of Gary Gygax – an odd name, sounding like something out of his own creation, or something you have sliced thin on brown bread, with dill and mustard sauce. "Gygax?" "Mmm, lovely". He was the inventor of Dungeons & Dragons, and died earlier this week, leaving behind hundreds of thousands of mourners – at least.

It's hard to estimate the effect of Gygax's work on the gaming industry.  Borrowing from established fantasy authors (Tolkien, L. Sprague de Camp, and Fritz Leiber, just to name a few), Gygax and co-creator Dave Arneson more or less single-handledly invented the role-playing game.  They were the first to establish the gameplay conventions and iron out the thorny usability issues pertaining to simulating an entire dungeon - nay, an entire world - with pencils, paper, and an arsenal of dice.

Their original ideas - hit points, levelled character classes, experience points, learned skills and spells, among others - have defined the role-playing game genre, computer-based and otherwise, for three decades.  The release and popularization of Dungeons and Dragons inspired an avalanche of new RPG properties, including rival paper-and-pencil gaming systems such as BRP and GURPS; interactive "role-playing" fiction a la Lone Wolf; and a truckload of video games.  As Matt Barton writes, in his excellent article on the history of computer-based role-playing games:

Taxonomic quibbling aside, there is no doubt that while they are not direct descendents, [computer role-playing games] were deeply inspired by D&D. At the very least, it's obviously more than a coincidence that so many of the themes and trappings are shared by both genres, and both are highly absorbing and addictive. One wonders if Gary Gygax and Dave Arneson knew the full implications of what they were doing when they sprung Dungeons & Dragons on an unsuspecting public back in 1974.

The thing is, I don't think Gary Gygax and Dave Arneson had a clue.  I think they thought they were building a role-playing game called Dungeons and Dragons.  And to be sure, that was the end result of their work.  That was their product.  But the work itself - what was that?  Was it writing?  Creativity?  Logic?  Mathematics?  All of the above?

I believe what Gary Gygax, Dave Arneson, and the good folks at TSR were really doing was this:

  • Analyzing the real world
  • Producing key abstractions (fighter, wizard, thief, cleric, dragon, dungeon, town) modelling the real world in a simplified but consequential way
  • Encoding those abstractions via a language, in this case English and the distinctive brogue of the RPG rulebook
  • Testing those abstractions in the real world, through extensive user involvement

In other words, these pioneers of the RPG were performing classic, object-oriented analysis, design, implementation, and testing - full lifecycle development - at a time when computing was in its infancy.  Given a particular problem domain...

a medieval world rife with magic and intrigue

...they created an intuitive and workable model describing that domain in a way perfectly suited to their user base.  Rather than implementing that model in a conventional programming language, they implemented it in the language of rulebooks and player guides, treasure tables and elaborate hexagonal dungeon maps - source code intended for human compilers, but source code nonetheless.

To me that's not just programming, it's virtuoso programming of the highest order.  So here's to Gary Gygax, who may never have known he was a programmer.  Nevertheless, if we all, as professional software developers, approached our problem domains with the same sense of confidence and flair, the computing world would be a better place.

Until then... may your swords be sharp and your lanterns bright.