[ LiB ]

Once you've nailed down the setting, you need to figure out how the players will be represented. There are many aspects of a player you should be concerned with.


When you describe a human being in the real world, you can use many words. He can be strong, fast, agile, intelligent , and so on.

If you've ever played paper-and-pencil role playing games (RPGs), you know that most systems quantify these attributes using numbers . It's not a coincidence that most MUDs use a similar system, since MUDs are the digital equivalent of RPGs. Even modern graphical games, such as the Diablo series, and MMORPGs, such as Dark Age of Camelot and Everquest, use collections of numbers to represent player attributes.

So which attributes should you represent? Some complex MUDs have dozens of attributes; but for SimpleMUD, I'll only use the few listed in Table 7.1.

Table 7.1. SimpleMUD Player Attributes




This determines how strong you are and directly affects play within the game, such as how much damage you deal out to other people when attacking.


This attribute determines the overall well-being of your character. This affects things such as how many hitpoints you gain and heal over time.


This attribute determines how agile you are and affects how accurate you are with weapons and how adeptly you dodge attacks.

Experience points

These tabulate your experience in the game. Experience points are like scores; whenever you kill someone, you get experience points.


This is an artificial ranking that allows you to compare players within the game. Generally, players with the same level should be equal in capabilities and power.


This is the amount of money you have.


What would a MUD be without some way to gauge how much life a player still has in him? Basically, these points work as they do in any game; if they drop to zero, you die. Hitpoints are affected by your health.

Regen amount

This determines how many hitpoints you regenerate per minute and is affected by your health.


This determines how accurate your strikes are and is affected by your agility.


This determines how well you can dodge attacksalso affected by agility.

Strike damage

When added to your weapons attributes, this determines how much damage your attacks inflict on enemies. This is affected by your strength.

Damage absorption

This determines how much damage you suffer whenever you're hit.

This is also affected by your strength.

That's 12 attributesfor a simple game! You can see that attributes for more complex games can become numerous .

Core Attributes

The first three attributes listed in Table 7.1 are core attributes (strength, health, and agility); they define actual physical abilities . Pretty much everything else is gained within the game, changed frequently, or based on the core attributes.

In any game system, you've got to create attributes that reflect the abilities your players are going to have in the game. The calculations for these attributes must be tuned and balanced perfectly . I'll go into more depth on this subject later on, so it's okay to just fudge the meanings of these attributes and their calculations for now.


You should keep in mind that the attribute system of the SimpleMUD is really arbitrary . You really shouldn't feel obligated to copy it or emulate it if you don't want to. I'm sure if you've played RPGs, MUDs, and MMORPGs, you have an idea what kind of at tribute system you want to imple ment already, so don't think that what I show you here is set in stone.

It is a general practice in many MUDs and RPGs to assign random values (or let the user choose them) to the core attributes, and then calculate everything else based on those.

The most popular system, Dungeons and Dragons (D&D) , uses three rolls of a six-sided die to give each player's attributes a value from 318, but for now, I'm just going to use a simple one-to-infinity scale for all three of the core attributes. All players are going to start off with 1 for each core attribute and are awarded 18 attribute points, which they can allocate to any of the attributes they want. So when a new player joins, he can configure a character the way he wants; he can even everything out and put everything at 7 points, or give a completely uneven spread with strength being 19, and health and agility being 1. It's up to the user.


You need to figure out if your attributes should be open - ended or closed. For example, in D&D , you can range from 318, and that's a closed system. You can't go lower than 3 or higher than 18, and you can't change your attributes in the game. This works well on paper because it's so difficult to recalculate everything whenever your attributes change, but MUDs run on computers, which are designed to do tons of calculations quickly. As a result of this, you'll see that many MUDs tend to prefer open systems, be cause they give you opportunities to extend the gameplay. Any time you offer the player an extra chance to improve his skills, you're adding more gameplay and probably making the game more flexible and enjoyable to your players. Of course, the downside to open-ended systems is that it's possible for people to advance an attribute further than a reasonable level. Because of this, open- ended systems tend to become unbalanced quickly, when certain players figure out which attributes give them super powers past a certain number. (It happens.)

Furthermore, whenever a player advances a level, he is given two extra attribute points, which he can put toward any of his three core attributes.

Life Attributes


Regenerating hitpoints is a concept that you won't find in every MUD. Many MUDs refuse to give you any free hitpoints (even though human bodies regenerate naturally), and instead force you to gain your hitpoints by manually healing your self at something like a temple, or with magical spells and potions. I tend to prefer a regeneration sys tem, however, simply because it makes the game more playable . Makes it a little easier too; I hate difficult games. Maybe you're tougher on your players, though, and don't want to give them free hitpoints.

The hitpoints (HP) attribute has two associated variables : Maximum Hitpoints (MHP) and Current Hitpoints (CHP). Your MHP is calculated using your health and level attributes. When you start off, you are at Level 1, and you are given 10 HP, plus your health divided by 1.5 (with the result truncated using integer division). Since your health core attribute can vary from 1 to 19 at Level 1, your MHP can range from 10 to 22. (1/1.5 is 0.6666, but that turns into 0 when truncated into an integer; 19/1.5 is 12.6666, which is 12 when truncated.) Whenever you gain a level, your MHP increase by (Health/ 1.5) + PreviousLevel. So if you're Level 1, and you increase to Level 2, and your health is 19, you get an extra 13 HP (19/1.5 + 1 = 12 + 1 = 13).


To take the idea further, think about how humans regener ate. If you scratch or lightly cut yourself, you stop bleeding in a minute, and the scar is gone a few days later. But it's kind of difficult to imagine a person slowly regenerating his health after suffering a rendezvous with a sharp sword to the neck. If you want a realistic system, maybe you should consider making people regenerate health more quickly when they are healthy , and more slowly when they are at their deathbeds. Maybe you can even take it further, and have players degenerate after they have gone below a certain point; i.e., your bleeding is slowly draining your health and you can't stop it on your own.

The number of hitpoints you regenerate per minute (HPR) is calculated by your health attribute. It is simply your health divided by 5. So if your health is 15, you regenerate 3 hitpoints per minute.

Accuracy and Dodging Attributes

Both accuracy (ACC) and dodging (DG) are based on your agility attribute. These values are percentage based, but they don't strictly fall into the 0100% range. When I get to the combat section, you'll see how these work out, but for now, you should know that both accuracy and dodging are calculated as Agility*3, so an Agility of 1 gives you accuracy and dodging values of 3, while an Agility of 19 gives you 57.

Damage Attributes

Like the accuracy and dodging attributes, Strike Damage (SD) and Damage Absorption (DA) have base and current values.


For a more complex MUD, you might consider keeping an array of strike-damage values, based on the type of weapon you are using. For example, an assassin would be adept at using a knife and would get a special bonus when using knives, but he would be absolutely awful when yielding a two-handed sword that a person like Conan The Barbarian Governor could handle with ease.

These values are raw-point based, so that a 1 for damage absorption means that you absorb 1 point of damage every time you are hit, and a 1 for strike damage adds 1 point of damage to all strikes you deal out to enemies.

Your SD and DA values are calculated by dividing your strength by 5, meaning that for every 5 strength points you gain, both your SD and DA will go up by 1.


In the previous four sections, I told you about nine different player attributes. Every player within the game will have two values for each of those nine attributes: a dynamic value and a base value. The dynamic value of each attribute is calculated based on the player's current level, attributes, and inventory; these values aren't going to be saved to disk anywhere , since they are completely calculated at run-time.

On the other hand, all nine attributes will also have base valuesvalues that are permanent to a player. The base values will be modified by items that give permanent effects (such as magic potions or other such stuff). These base values are the ones that will be saved to disk.

Within the game, the true value of any given attribute is calculated by adding the base and the dynamic values of each attribute.


The base/temporary value system is fairly common in MUDs. This system allows you to apply both temporary and permanent attribute modifica tions to players. This in turn gives you more flexibility and expandability in the game, by adding more effects. For example, you could have cheap potions that increase your strike damage for a few minutes, or go for the real deal and buy a permanent strike damage potion (only costs an arm and a leg!).

Experience and Leveling

To keep people in your MUD interested in playing, you need a system by which the players can see a noticeable progression in their characters . If players don't see improvements, they tend to get bored and leave. Some games do this very well, and have even earned reputations for how well they present progress (if you've ever heard the term Evercrack , then you know what I'm talking about).

The classic way of representing a player's progression is through levels. Every time a user gains a level, he also gains power, and this power is the reward for playing the game.

So how do you determine how the player increases in levels? The classic method is to use an experience system. Every player has a certain number of Experience Points (EXP), and these points are awarded to the player for doing various things throughout the game (though most games just hand these out only when you kill, which is the case for SimpleMUD).

So, whenever you reach a predetermined number of EXP points, their level can be increased by 1.

What kind of system should you use? A linear system, in which you increase in level every x points, tends to unbalance games quickly. What happens is that some people get far too powerful far too quickly, and then the game isn't really fun for them anymore, since after a month of serious playing, they can become virtual gods.


You might want to think about a system that awards points for things other than killing. In a truly community-oriented game, you're going to have characters who aren't great at killing but provide some other valuable services (such as healing foolish heroes who think that they can take on a diamond- skinned dragon to impress a damsel in distress). Awarding points only for killing can lead to players never wanting to play other parts in the game. This can eventually make your MUD completely combat based.

I've always preferred exponential experience curves. Take a look at Figure 7.1.

Figure 7.1. If players advance with exponential curves, games are more interesting than with linear curves.


In the example, I've used two different formulas to calculate the curves. For the linear curve, I've used the formula experience = (level - 1) * 100 . That means that for every 100 points, you can advance to another level. At 100 points, you go to level 2, and at 200 points, you go to level 3, and so on.

The exponential approach takes a bit more to get to the higher levels. I used the formula experience = 100 * ( 1.4 (level-1) -1) . If you're not sure what exponentials are, let me give you a quick rundown. An exponential curve follows a basic formula n x , in which n is a constant, and x is a variable. Basically, n x+1 is equal to n*n x , so you know that if n is 2, increasing x by 1 doubles the result. In the case of the formula I showed earlier, every level requires 1.4x as many experience points as the level before it. Table 7.2 shows the number of experience points needed to attain levels 110 with both formulas.

Table 7.2. Linear Versus Exponential Levels




Exponential Difference








































There is an extra -1 thrown into the exponential formula for good reason. Mathematical rules state that no matter what n is, n is always 1. So at level 1, if you don't have the extra -1 , you're calculating 1.4 * 100 , giving you 100. This means that you need 100 EXP just to reach level 1. In reality, we want 0 instead of 100, so we take 1.4 -1 instead, which is 0. This way, the graph starts off at 0 when your level is 1.

You'll notice that for levels 1 through 6, the amount of experience needed for each level on the exponential curve falls below the linear curve. This shows that the exponential curve gives an easy start to players. Beyond level 6 though, the exponential curve takes off way past the linear curve, and it takes more and more experience to reach each new level.


Some MUDs I've played on use a precalculated method, which follows no real formula, but has a general trend of increasing experi ence requirements. As you'll see from playing the SimpleMUD, the experience requirements get extremely high at higher levels, so even the exponential method has its drawbacks.

For example, it takes 100 experience points to go from level 8 to 9 on the linear model, but it takes 421 points on the exponential model. Even worse , 9 to 10 takes 591 on the exponential model, but still only 100 on the linear. Notice that each number in the difference column is approximately 1.4 times larger than the number before it.

With this kind of a curve built in to your game, you can ensure that people don't rapidly outpace your game and beat it within a month. You must be careful, however, because using an exponential curve eventually makes it virtually impossible for the players to advance.


Every player in your game has an inventorya place where he keeps all the items he is carrying. Many complex games use complicated systems for this, but for our purposes, each player simply has an array of 16 objects he can carry at any given time.

As well as having an inventory, players have two different types of items equipped : a weapon and a piece of armor. When a weapon is equipped, all its bonuses are added to the player's attributes, and the player uses that weapon to attack enemies. The armor similarly adds bonuses to the player's attributes to help him in combat.

Other Data

Other than the attributes and the inventory, SimpleMUD players don't have much else. Many complicated MUDs have more data per player, but that's really not needed for this MUD. The only other pieces of data SimpleMUD players have are their names , passwords, and user classes.

User classes determine the abilities of players. When players first sign on, they are class "REGULAR", which means they are just regular users. People who keep order within the game will be given the "GOD" class, in which they can kick unruly users if they need to. You, the operator of the MUD, will be in the "ADMIN" class, however. This means that you have access to the special commands that allow you to control the game.

[ LiB ]

MUD Game Programming
MUD Game Programming (Premier Press Game Development)
ISBN: 1592000908
EAN: 2147483647
Year: 2003
Pages: 147
Authors: Ron Penton © 2008-2017.
If you may any questions please contact us: