|My advice to anyone wanting to write a MUD server from scratch is:|
Stop! Don't write any code until you have got a detailed design of your MUD. This doesn't have to be a technical design, but rather, what the MUD will offer to the player.
Why? I have tried the other way a couple of times, and it is a mistake. The "other way" is to start programming madly, and then after a few months, start trying to reach agreement with your other admins/developers about fundamental issues. The problem is these issues may conflict with code you have already written.
The issues described below can be considered by anyone interested in running a MUD - they don't have to be programmers. Unless you can write down some sort of answer to these questions you are not ready to start yet.
Here are some design points to consider:
Text or graphics?
Rooms or co-ordinates
- Do you want a straight text-based MUD, or are you planning on requiring a custom client? If a custom client is required, you have doubled your work immediately, because you are writing both a client and a server.
- Are you planning to have things that require know exactly where players are in relation to each other (rather than just "being in the same room")? If so, you probably need some sort of co-ordinates for everything, rather than just have room 1001, 1002, and so on.
Things that might require positional information are:
- Ranged weapons (when are they in range?)
- Area-of-effect spells (what mobs are within 10 yards of the spell?)
- Needing to be in front, or behind things (eg. for backstabbing)
However if you do decide to do that (store co-ordinates for everything), the work load is immense. Here are some problems:
- Room design is harder - not only do you need to design rooms, you have to place things in them exactly.
- For anything that moves, like computer-controlled mobs, you need to work out things like pathing algorithms, so they can walk from A to B without going through walls, tables, rivers, and so on.
- You need some sort of line-of-sight algorithm, so that a mob doesn't "see" a player, who might be very close, but with a solid wall between them.
- Decisions about whether aggressive mobs see and attack a player can no longer be a simple test of whether they are in the same room, but based on distance apart, line of sight, whether obstacles are in the way (like canyons, rivers etc.).
- It is hard to describe positional information in a text MUD anyway. You will probably need a graphical client.
Resets / repops
- Are you planning scripting, so that room designers can write simple scripts to make things happen without having to change core code (eg. to make a mob's behaviour be conditional on what you are carrying). If so, which language? Is it compiled or interpreted? What happens with an interpreted language if a runtime error occurs?
- What is your policy for resetting, or repopulating, areas once mobs have been killed by players? Every 15 minutes? Or after a certain interval elapses after a mob dies it is replaced?
- The same question arises for resources that players need. For instance, if they have to collect an orb from a mine, and one player takes it, how long until it is replaced?
Races / classes / factions
- Do you want fighting? If so, what are the rules? Do attacks take time (eg. a slow sword swing, or a fast dagger strike)? Can strikes be resisted, dodged, parried, evaded, and so on?
- Do you have player-killing? (player vs. player). This can make your MUD more exciting, however you need to design in the rules. Can anyone attack anyone else? It is consensual? Can you only attack an opposing faction? What about NPCs (mobs)? What is to stop level 100 players wandering around killing your newbies 5 minutes after they connect to the game?
- Do you have magic spells? If so, how do they work? Do they take time to cast? Can they be interrupted, resisted, repelled, reflected? What do they consume (eg. mana).
- What "cooldown" do spells or abilities have? For example, a powerful spell might only be useable once every 10 minutes, thus you could say it has 10 minute cooldown.
- Can you run from a battle? With what degree of success? Can you be chased? If so, how far?
- Can combat occur in towns or "safe places"?
- Do you have "area of effect" spells? (ie. a spell that hits all mobs, not just one)
- Can characters freeze others in place (eg. to escape)?
- Can characters hide (eg. to sneak past something)?
- What happens if a player loses his/her connection in the middle of combat, intentionally or otherwise? Does their character keep fighting (or being attacked) until it is dead? It is removed from the game after 30 seconds?
- If multiple characters are attacking one mob, which one does the mob fight back? The weakest? The first to attack it? The last to attack it? The one causing the most damage? The one who is nearest to death? The one who is healing others?
- Do you have different races (like orcs and goblins)? If so, what makes one different from another? What are you doing to make them balanced, so that one race is not all-powerful, or too weak?
- Do you have different classes (like mages and warriors)? If so, what reason would players have for choosing one over the other? What are you doing to balance them? You probably need a paper-rock-scissors model, so that no one class (or race) can defeat, or be defeated by, all other ones.
- Do you want different factions? (eg. good/evil, humans/martians, alliance/rebels). Factions can add interest to a game because they give a natural "side" that players can join. However if you have different factions then you have extra complexity (for example, deciding who fights who), and you would need cities/towns for each faction.
- Most MUDs assign some sort of attributes to the characters (eg. strength, dexterity, wisdom, luck). What ones will you have? What does each one do? Try to be specific, not just "wisdom makes you smarter". For example, "each point of wisdom gives you 10 mana", or "each point of strength adds 1 extra damage to a sword-wielder".
- How are the initial attributes assigned? Randomly? A table per class / race?
- How do players increase their attributes? Wearing equipment? Going up levels? Spells? Do they choose themselves what attribute is increased? (eg. each level they may be assigned 5 new attributes to distribute as they see fit).
- Work out in advance what the rules are for applying each attribute, not just vague talk about how "dexterity will be useful". For example:
- Each 10 points in dexterity increases your chance to dodge a melee attack by 1%
- Hit points lost in a melee attack = (attacker_attack_rating - defender_defense_rating) * weapon_damage_amount + dice_roll (2, 3)
Doing this will help focus on what attributes you want in your MUD, and what they will be used for.
- Do you have transport systems (cars, boats, trains, aircraft, portals, teleports, horses)? If so, how do they work? What do they cost? Can anyone use them? What happens if a player logs out while on a boat?
- What happens when a character dies? Does it lose money, experience, equipment, or suffer damage? How long before it can be played again? Any penalties?
- Can players resurrect other players? What are the requirements? How long does it take? Does it consume a reagent? Have a cooldown time?
- Can players form groups? Is there a limit to a group's size? What happens if the group leader leaves? Is there a limit to level differences? (eg, no grouping level 1 players with level 100 players)?
- Can players automatically follow other players?
- What are the rules for looting mobs once killed (inside a group)?
- What are the rules for gaining experience when a group kills a mob, or completes a quest? Do these vary if some group members are not in the same room? Or a long way away?
- If a group kills a quest mob (eg. a boss) does the entire group get credit?
- If a quest mob has a quest item (eg. a pendant) does the entire group get it, or only the player who looted the mob?
- If a group kills a mob, but a character in the group dies half-way through the fight, does it get credit for the kill? If there is a quest item does s/he get that too?
- Can players form guilds (groups with some common purpose)? How? At what expense? Are there membership limits (eg. only orcs).
- What requirements are there to form a guild? Disband it? How do players get added to a guild? Removed from it? How do they remove themselves? Remove someone else? Do they have a guild meeting place?
- Think about your game economy. MUD games tend to suffer from inflation because there is an unlimited amount of resources that can be obtained (you kill a mob, it comes back 5 minutes later, and mobs generally carry cash or valuable items). You need to design in "cash sinks" - ways that force players to spend their cash so there isn't too much of it around. For example, charge for transport, repairs, training, food, etc.
- Can players trade with each other? (eg. sell a sword for 5 gold pieces). If so, how do they do that? Do they have to be in the same room or close by? If not, how would they do it? Do you have a mechanism to avoid cheating? (eg. a player pays his 5 gold but is not given his sword).
- Do you want some sort of auction system? This could let players put goods up for auction, and let them sell to the highest bidder. You need to design the rules for such a thing.
- How do players buy/sell goods? From shops? Wandering salesmen? Can they sell anything to anyone, or does it have to be a dealer in that product? What is the buy/sell markup? A fixed percentage or set for every object in the game? Are shops always open? Do they run out of goods? If a player sells something to a shopkeeper, is that then available for someone else to buy?
- Do you have quests? (eg. "your task is to kill 5 kobolds", or "please take this letter to the mayor"). How are they defined (eg. in a script)? What are their rewards? Does one quest depend on another?
- If you choose to have quests you will probably need to spend hours (if not weeks) designing a suitable set of quests, for each level that players will be in your game.
- Can quests be shared with other players?
- Who gives out quests?
- Who accepts completed quests?
- How do you abandon a quest? Re-gain it?
- Is there a limit to the number of quests you can do?
- Do players need to train to learn things? From where? At what cost? What are the prerequisites? Can they learn everything, or do you limit them to choices (eg. you can learn 5 out of the available 10 skills)?
- How are skills developed? Through practice? Trainers? Purchasing things?
- Can players learn things (eg. metalwork)? Where do they learn? What materials are required? What cost? What can they make? What use are the made products (eg. swords could be sold). You may need to define, for each skill that players can learn, something like this:
- Skill level required to make it.
- Do they know how to make it? (eg. have the recipe)
- What reagents are required? That is, the things that are consumed in the process (eg. leather to make shoes)
- What tools are required? That is, things that are needed but are not consumed (eg. a leather-worker's needle).
- Do they need to be at a certain place? Eg. a forge for metalwork, a fire for cooking.
- Most MUDs have objects - that is, things that can be picked up, carried around and used. What are you planning to have? What will they do? Where do players get them? What use are they? Can they be bought or sold? Can they be made?
- Does equipment wear out? To what rules? How is it repaired? At what cost? Where?
- Can objects be discarded (left lying on the ground), or destroyed?
- How many objects can a player carry at one time? Can they purchase or obtain extra capacity? Is capacity based on weight, number, volume?
- What attributes do objects have? An object might have:
- Armour class (wearing it increases armour)
- Attack rating (wielding it gives X amount of attack, eg. a sword)
- Attribute modification (eg. wearing it increases wisdom)
- A use - eg. using a key unlocks a door, eating food increases health
- Value - how much you can sell it for
- Wear and tear - how much damage it has suffered
- Minimum level number to use it
- Restrictions on use - eg. only mages might use wands
- Can a player carry more than one of it? If so, is there a limit?
- Is it a quest item? If so, for which quest(s)?
- Does it disappear if the player disconnects?
- Can it be sold? Traded?
- Do you have an in-game mail system? If so, what can be sent? Messages? Objects? Money?
- Where are mailboxes? Does it cost to use them?
- How long does mail take to be delivered?
- Do you have a "bank" or similar storage place where players can deposit things that they cannot fit into their inventory?
- How much can they store in the bank? Where is it/them? How much does it cost to use it?
- Do you log everything that happens? Eg. what players say, who they kill, what trades are occurring?
- In the event of a dispute, can the log be easily perused?
- Do players have levels? (eg. you start at level 1, and hope to reach level 100). How many? How do you advance levels? What advantages are there to being a higher level?
- What do players do when they reach the highest level?
- Do you - the developers of the game - plan to make (real) money from it? Are you going to:
- Charge by the hour to play?
- Have a monthly subscription?
- Have a free trial period?
- Sell in-game goods or services for real money?
- Sell the game itself (to other aspiring MUD admins)?
- Who collects the money, and how?
Running the game
- Who "owns" the game? If you are developing it from scratch, using a team of people, what happens if one leaves? Who (if anyone) owns:
- The name of the game?
- The computer program?
- Any scripts used in a scripting language?
- The room design (eg. room descriptions)
- Other designs (eg. quests, object design)
- Can someone leave your development team, take a copy of everything, and start a competing game?
Handling problem players
- What server are you going to run it on? A commercial server or the private one belonging to one of the developers?
- How are you going to administer it 24 hours a day / 7 days a week / 365 days a year? What happens if the chief (or only) programmer goes on holiday for a month and it crashes while s/he is gone?
- Are you planning to have customer service people online all the time to help players? Will they be paid? How much?
- What will you do to help players that are stuck (eg. in a room with no exits), or have lost all their goods through some bug (or their own fault)?
- What method do players have to report bugs (eg. misspellings, or broken quests)?
- Eventually you will have a "problem" player. How do you deal with him/her? They may do things like:
- Have an unsuitable name, like a swear-word, or a name that implies they are an admin.
- Use abusive language.
- Harrass or irritate other players.
- Make life hard for other players by killing mobs that they are trying to kill or otherwise disrupting their quests.
- Cheat, eg. by promising to pay for something and then not pay.
- Exploit game mechanics or bugs to become super-powerful.
- Camp out valuable resources or important mobs, getting to them before anyone else can.
- You probably need some "self-help" mechanism for other players (eg. being able to ignore an annoying player), with a fall-back of being able to get help from a customer service person in extreme caes.
- Do players create "accounts"? That is, a central log-in point for all of their characters? Or is each character treated on its own? Is there a limit to how many characters one player can have?
- Do you allow multi-playing - that is, one person controlling multiple characters simultaneously? It may be hard to stop simply based on IP address these days, as many IP addresses are shared by routers using Network Address Translation (NAT).
- Do you "lock out" accounts for some reason (eg. non-payment, misbehaviour)?
- Every game will start of with "newbies" - even if they are experienced MUD players they will be new to your game. What do you do to help them? You might have help files, easy quests, a more experienced player assigned to help them, "newbie" chat channels, and so on.
- What do new players get to choose when they start playing? Character name / gender / race / class / description?
Mob / NPC artificial intelligence
- Players expect to talk to each other - do you have multiple chat channels? You probably don't want level 100 players having to put up with newbie questions in the middle of a difficult quest. However newbies will need help too. Do you "zone" your chats, so the chats are relevant to where people are (eg. zoned to the current town)?
- AI (artificial intelligence) is the programming that controls your mobs / NPCs (Non Player Characters) so they behave in a reasonably interesting way. How do you plan to have this work? Do all mobs behave the same, or do humanoids behave distinctly differently to (say) spiders?
- If NPCs are spell-casters, what spells do they choose to cast?
- Do NPCs run away if facing an overwhelming foe? If so, how far?
- Do NPCs go and get help?
- Inside what range do aggressive NPCs attack?
- If the player runs away, does the NPC chase it, and if so, for how long?
- How is your virtual world organised? Is it Earth-like with continents or seas? Science-fiction where each town is on a different planet? Where are the towns? What is the purpose of each one? How do you travel from one to another?
- Is there weather? What does it affect?
- Is there day/night? What does that affect? Are shops open all the time?
- Do players need to carry torches (light sources) inside parts of the world in order to "see"? How long do they last? Where do they get them?
- Do you plan to have "instanced dungeons"? These are areas of the game where players (or groups) get their own copy of a particular area. The point of this is to allow a group to play on its own, and not find that someone else has just killed the boss, or is harrassing the group. If you do plan on this, then it impacts on game design, because you may need to record an instance number alongside a player's location (eg. player Nick is in room 1002, instance 3).
- Can players have pets? (eg. a pet dog) Is it for combat or local flavour? If for combat, how is it controlled? What happens when it dies? How is it resurrected / replaced? Does owning a pet cost anything (to purchase, or for upkeep)?
Making characters different
- What can you do to stop high-level players helping their friends with inappropriate equipment? (eg. level restrictions on good gear).
- Is each class / race / faction balanced? You can be sure that if players work out that "orc warriors" are much more powerful than everything else, then soon the game will be filled with orc warriors.
- Are attributes balanced? If one attribute (eg. strength) has a disproportional affect on combat, then every player will put all their points in strength (if they can).
- You will probably want some sort of system that makes players choose between mutually exclusive features for their characters, so that you don't have, after 3 months, a MUD filled with dozens of characters who are all the same because they have all "maxed out" on every possible attribute.
- Choosing different classes / races, where each one offers something the others don't
- Choosing different professions, which offer different things in the game (eg. make armor OR make potions, but not both)
- Wear different clothing, where a particular piece of armour can add protection or offensive power, but not both
- Give players optional points to choose from, where they have to choose 20 out of a possible 50, so it is unlikely that every player will choose the same 20. Points might be spent in offense, defense, stealth, long life, short battles, and so on.
- Players expect their characters to be there next time they connect. When is game data saved? Every minute? Every time a player changes rooms? Do you save to lots of small files (eg. one per player, like SMAUG does), or one big file (like PennMUSH does).
- Do you save to flat files or an SQL (or similar) database?
- What is saved? If a player moves an object from one room to another does the game remember that?
- If the server crashes and is restarted, what state is everything in? Are all mobs repopulated into their default positions? Or, does the game remember where they all were 5 minutes ago?
- How do builders extend the game? Dynamically while players are online? Offline by editing area files?
- Do you have some sort of "builder interface" used only by builders to extend the game while it is running?
- Do you provide some sort of web-page interface for builders?
- Does the game need to be restarted to incorporate additional content?
If I have forgotten some points, please feel free to post your own ideas below.
- Nick Gammon
| top |