| Maintainable Code |
Maintainable code is essential to the easy maintainence and running of a MUSH throughout all the difficulties it will go through (wizard changes, servers failing, code failing). When I talk about Maintainable code, I mean code that:
This may seem like a tall order, especially considering how little documentation is usually done on major systems code (I'm guilty of this myself).Readability eases other's maintainence and modification of your code, as well as bug tracking and reporting. Sometimes readability means your code will be slightly slower, but unless it is a really time-sensitive code, that's probably not a big issue.
Most people write the former type of documentation for their code, but not the latter. The latter is important for the same reasons that readability matters -- sooner or later someone else is likely to be working with your code. Documentation in the code (via the @@ command, or a comment() function which I'm going to add to my mush and submit as a function to add) is very important, especially when you are doing strange and convoluted expressions or code strings.
Easily remembered commands often associate English phrases or ideas with the commands, some examples such as '+wield object' are common throughout MU*es and other text-based RPGs. Hard to remember commands include stuff such as two separate commands to do the same action, such as '+air' and '+fly' for a space system ('+air' only works in atmosphere, '+fly' only in space).
Logical commands go hand in hand with easily remembered commands. To
speak in a language, it's logical to '+speak
Useful commands are really the only type that should be coded and put in the master room. You don't need thousands of little silly commands like +wink, +hi, etc. All those do is slow down the server. If players really want those commands, let them define them as macros in their client or go without.
For example, the Judges who can rule on combat matters should have a way to easily kill or heal a player without resorting to using IC commands like +attack/+heal. There should be a special '+jkill' command that allows a Judge to instantly kill any player (died falling or some other RPed combat/damage) and another '+jheal' to allow the judge to heal a player.
| Home | MUSH | Theory | Sitemap |