Add to Technorati Favorites
February 2012
S M T W T F S
« Nov    
 1234
567891011
12131415161718
19202122232425
26272829  

Entrecard Drop List

Join our Entrecard Drop List

Anatomy of a Design Failure: Threshold players able to attack and kill themselves.

People keep asking me to write about how and why I designed things, so I guess it is about time I actually broke down and gave the readers what they want. As I noted in a comment post, when I look back over my 16+ years of computer game design my failures stand out for me more than my successes. I don’t think that is negativity. I think it is just a bit of perfectionism mixed with a desire to never forget my failures in order that I not repeat them. In this post, I am going to discuss an absolute disaster of a design failure from the early years of Threshold : allowing players to attack (and kill) themselves.

You’re kidding right? Threshold players could attack and kill themselves?

No, I am not kidding. This design failure started out as many design failures start: an unintended “feature” (not quite a bug really, but close). Add in some developer arrogance, and you have a gross design failure that was allowed to exist for YEARS.

In the original command to initiate a basic attack (the traditional MUD “kill” command), I forgot to put in a simple, check that would go something like this:

if(  this_player() == target )

{

write(”You cannot attack yourself.\n”);

return 1;

}

Many special abilities had checks like that, so it isn’t like I didn’t understand the obvious necessity of such a simple check.

So… That’s It?

Not remotely! Soon enough, players started reporting this nifty little surprise feature. People playing elf characters (for example) were taking a logical shortcut by typing “kill elf” when fighting a drow elf.  When looking for the first living in the room with an ID that matches “elf”, the command would often find the player himself or herself. Result? Self combat.

I went into the kill command to fix it, and just happened to drop the fix in a less than ideal place. Instead of adding the little snippet of code I already showed you, I instead added something like this:

if( lower_case(str) == this_player()->query(”race”) )

{

write(”You cannot attack yourself.\n”);

return 1;

}

The “str” variable is the string someone enters after the command “kill.” So if your character was an elf in this situation you might have typed “kill elf.” The “str” variable would be “elf”, which would be lower cased (just to be sure) and then compared to your race. It would then tell you to cut it out.

Sounds Like a Happy Ending Then.

Not a chance. The programmers reading this probably already see the problem. There are potentially more ways to target yourself besides just your race. Some people would actually mess up and type “kill <their character name>”. Sounds crazy right? Well everyone who has chatted online has accidentally mischanneled or typed the wrong name somewhere. It happens. Other times, people would lose track of how many elves were in a room, and type “kill elf 3″ to attack the third elf in the room, but that third elf would be themself! EEP!

So You Just Fixed That Too, Right?

That would be the logical thing to do, right? Nope. At the time, I was massively overworked. I was in law school. I had a job. I was trying to build and run an online game all by myself. I was stressed out. When informed something was broken that I had already worked on and deemed fixed, I reacted poorly. Instead of making the 30 second fix, I chose to make a design decision that attacking oneself meant your character went “INSANE” in character, and you now had to deal with the consequences.  I rationalized this as logical since SURELY no sane person would attack himself/herself… right? Since they were mostly doing this by actually typing their own character name as the target, I felt justified. After all, I thought, if people are so careless that they type their own name after the kill command, they deserve to die… right?

This design decision was wrong on so many levels.

1) The core mistake was mine. Developers should ALWAYS take ownership of their own mistakes.

2) The first fix did not fully remedy the problem. That happens. A developer should not take offense at this, or be upset. Some things are tricky and take more than one pass to fix. This is no big deal. Just fix it again.

3) Developer Arrogance: “My code works fine if players aren’t stupid/careless/weird with it!” Too bad. The way the players interact with your game is important. If they commonly do something that causes unintended effects, figure out a way to prevent it from happening.

Can You Still Kill Yourself on Threshold?

Threshold is a challenging, old school, role playing mud. You can definitely kill yourself. But you can’t do it by attacking yourself any longer. You have to actually go out and do something risky or dangerous. A few years later (yes… sadly I must admit it was years) I finally did the right thing and fixed the condition the right way. I also added an “attack stop” (by this time, the “kill” command had been renamed “attack”, since “kill” is a little presumptuous) command so people could stop fighting for whatever reason they chose (but their opponent might keep fighting!).

Well, that is the anatomy of a terrible design decision, and it is also an example of absolutely horrendous developer arrogance. The only positive to the story is that it took place over 10 years ago. I have learned a lot since then, and hopefully I have not and will not do anything like that again.

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>