Thinking back to Die By The Sword reminds me of what was possibility the worst case of speculative generality / premature abstraction I ever indulged in. Pete told me that we were going to have a lava pit in one of the arenas - most of the characters would get burned when they entered it, but a couple (the skeletons and Magmar the rock elemental guy) would be immune.
I dove in and started coding. Brandishing the ideal of data-driven design I said to myself, "I don't want this to be some kludge. I want this to be extensible and abstract."
So here's what I did -
* Any polygon you could stand on had an associated temperature.
* All the creatures had a temperature endurance. Magmar and the skeletons could stand very high temperatures; most people got uncomfortable around 90 degrees centrigrade.
I forget how I propagated all this information into the data files and whatnot. There may have been a table or two in the source-code itself, immediately throwing one of the advantages of data-driven design out the window (designers not having to touch code files and all that.)
What was I thinking? No idea. Was I imagining that someday a desinger would want to put in some kind of "medium-hot" surface that some third class of creatures - not as tough as the skeletons or Magmar - would be able to walk across? Or maybe a "superhot" surface that would destroy even skeletons? Of course, there were no changes to that code after it was written, and a simple
if(( characterflavor!=MAGMAR) && (characterflavor!=SKELETON)) BurnTheCrapOutOfThem();
would have been just fine. And what I could have coded in minutes took a day.
TSTTCPW! Lived and learned.
Hey, as long as we're sharing, do any of you have good premature-abstraction stories?