torch Zylara's help on mud making or coding. torch


Updated March 03, 2001

I have been ask some of these questions many times, so I thought I would add an answer page for some of the most often ask questions. Hope this helps some people better understand about making a mud and learning to code a mud. Sorry about my website addresses not being actual links to click on, I will turn them into links later when I have more time. You can just copy and paste the address into your address box at the top of your web browser and hit enter or 'go' button or what ever your browser has.



Questions (not in any special order):
Can someone teach me how to code?
How do I make my OWN mud the way I want it?
Do I have to know how to code to make my own mud?
What files do I need to make my own mud?
What is a compiler and do I have to have one?
What are these .c, .h, and .o files?
What book should I get to teach myself how to code?
Do I need a special editor, or can I use wordpad/notepad?
Can a windows mud be put on a server?
What is a server and where do I find/get one?

Answers (also not in any special order):
Making a mud:
First off, making and running a mud is like a full time job. Players
are what you make muds for, I don't know anyone that has coded a mud
just for themselves to play on. It would be kind of lonely playing all
by yourself. Players are going to make demands on things they would
like to see in the mud they are going to be playing on. If you want
to get and keep players, then you have to include them as part of the
mud when changes are made. You can make a mud the way you want it,
but don't expect everyone to be of like mind, or you may not keep
much of a player base. I feel the best way to start a mud, is to
get your code (with no players) the way you want it, and running stable.
Add the things you think a mud should have, whatever you think would
be a perfect mud. Then open your mud to builders to get a lot of areas
made for people to play in. Most mud code bases come with a few stock
areas. Most people looking for a mud to play on will not play on a
new mud with only the same old stock areas. Then after you have a
good running code base and new areas, open your mud for players. If
they like what they see they will stay, if they like some of what they
see they will make suggestions/demands on what other things they want
if they are to stay. Of course you will always have some that say
your mud stinks and will leave after a few seconds (meaning they did
not even take the time to really look at it). You will prolly be
making a few more code changes after you open a mud, but most will
not be big/major code changes. So all this means is you are going to be
spending a lot of time on a mud, working....like a full time job.

What code base mud have you been on the most, or liked the best for
features?:
...smaug, diku, merc, rom, envy, ack, circle, silly, mush, tiny....
there are a ton of different ones out there...and most have a webpage
where you can download thier code base (the basic files that they
have chosen to release that you will need to code a mud like thiers).
Go here to see a list of some of the different ones...and there are
downloads for a lot of them here also, just click on the one you want
in the chart if it is there.
            http://www.game.org/heirarchy.html
If it is not found there, then ask on the mud that you like if thier
code base has been released, and if yes, where you can get it.
(I prefer smaug 1.02a myself, it is an older version of smaug that does
not have the fighting styles adding in).
Starting with someone elses code base is only modifing thier code.
If you use someone elses code base, there are licenses that you must
follow. Most just want you to add a line in your startup screen that
states that they wrote the code this mud is based on. That is only fair
as they did all the hard work in starting it and have released it
for others to use. Be sure you read any license agreements and
follow what it tells you to do.

So you don't want to use someone elses code base?:
Then yes, you MUST know how to code, as in takeing computer programing
classes, or be very smart and teach yourself how to code with a book by
trial and error. If you want to write your own code, then you don't need
anyones code base, you just open up an editor and start writing your
code. I don't recommend this unless you are taking classes to become a
computer programer or other such classes. Code can be written in any
programing language you like, some are in C, some in C++, others in
what ever the person writing it wanted to use. 

Buying a book:
Buy a book! Even if you are taking a class on programming, guess
what you teacher is going to have you do...............buy a book.
A teacher will not sit and teach you to code, they help you learn
through a book. Anyone with a desire to learn something can usually
find a book and teach themselves. If you are in the "very smart and
can teach yourself" group, then go out and buy a good book. I
recommend starting with an easy to understand one, like:
Absolute beginner's guide to C  by Greg Perry..............about $20.00
Later you may want something like:
The C programing language 2nd edition by Kernighan & Ritchie...over $20
There are a lot of Sams publishing code books out there:
Teach yourself XXXX programming in XX days...................$expensive
Other C books:
C Programming: A Modern Approach  by K.N King
C A Reference Manual  by Samuel P. Harbision and Guy L. Steele Jr.
Expert C Programming: Deep Secrets  by Peter Van Der Linden
Check out your local library and used book stores....I have found
a lot of programming books for 10 to 50 cents at the library or
$1.00 to $5.00 at a used book store. I have mainly listed C books
as that is what I have, but there are books out there for what ever
type of code you wish to learn.

Learning to code:
Whether you are starting with someone elses code or writing your own
you will be using the old trial and error process to get code to do
what you want it to. Steps to learn coding: 
1. Read the book
2. Write your code
3. Compile
4. Test your code to see if it does what you want
5. Read the book
6. Change your code
7. Compile
8. Test your code to see if it does what you want
9. Repeat steps 5 through 8 untill you have what you want
10. If you have problems, get some sleep
Steps 1 through 10 is how you learn to code. A persons brain can only
absorb so much information at one time. Therefore the more you read
and test and play around with code, the more you learn and remember.
Sleep is very important, lack of sleep (a coders downfall/bane) will
cause you to over look simple/silly little things and give you big
headaches. If you can't get something to do what you want or you
can't find a bug that is crashing your code (or any other similar
problems) then get some sleep/rest. After, you will prolly find it was
just a symbol or something else simple that was causeing your problems,
like a forgotten ( ) > < { } or ;
 
Learn to use GREP, MAN, and a debugger:
Most compilers come with grep and a debugger. Find and read all the
documentation you can on your compiler. There are usually readme, FAQ's,
helps, doc's, etc in/with most compilers. Some compilers have MAN pages
which are manual pages that will tell you what commands are and what
they do. A debugger is just what it sounds like....helps to find bugs
in your code. Grep (a coders best friend) is in most compilers, even
cygnus. To use grep all you have to do is start up your compiler and
change into your code files directory (where all your code files are)
and type:
grep realms *.c *.h
grep sacrifice *.c
grep 'No such location' *.c   <---use ' marks for more than one word
There are other syntax that can be used with grep, be sure to read
your compilers help on grep to learn more. I can not imagine anyone
coding without the help of grep, so check it out. Learn all you can
about your compiler, they usually have files to help you learn how
to use it, or check out thier webpage. Most even have a mailing list
that you can join to get help.

Where can I get cygnus:
I have a link to the cygnus website on my webpage, but as I just
found out the other day, cygnus has a new version and has changed the
download format. It can be confusing to a person who is new to all
this, so I took my old cdk.exe for cygnus B19, zipped it, and
uploaded it to a website (hope I can do that). It is still a 12 meg
file and takes awhile to download. Cygnus is a free download and a
project that people have worked hard on, and as with any software they
deserve something back for thier hard work, check out thier website
for more info. For the old cygnus B19 cdk.exe file, go here and click
on the "download for ron" ...and follow the instrutions on that webpage
(a temporary page I put up so a friend could download it).
        http://www.oocities.org/vozedale_ill/index.htm
NOTE: may take a few minutes for the download to start, but I tested it.

Editors:
I use to use wordpad/notepad but they are windows editors and will
sometimes add things to a file that you don't want in there. You
can safely use them if you save the files as 'TEXT ONLY' files. But
I don't garantee that to always work. The editor I am useing now is
a shareware and has a 45 day time limit on it...and cost $30.00
to register it...but it is a wonderful editor that can edit almost
any type of text file...HTML, UNIX, DOS, windows, .c .h, you name it
and this one can usually open it. It can change a file from DOS to
UNIX with the click of a mouse button. It can take 2 files in the
same format and compare them and give you a window with each difference
shown, which is really nice. It can show line numbers (a big help in
coding), and uses color in it's files where needed to show differences,
like in HTML or code files. It is called Ultra Edit and you can
download it here:
       http://www.ultraedit.com/downloads/index.html
If you are useing FAT-32 to run a bigger than 2 gig hard drive, then
get the 32-bit version...if not, and you are still useing FAT-16
then get the 16-bit version.

How compilers work and what the files are:
Code files that end in a .c (code files) or .h (header files) are
readable by humans. The .o (object files) are readable by your computer
or compiler. In coding you make changes to the .c and .h  files to
add code changes you want, then you use a compiler to compile all the
.c files, useing the .h files as guides, into .o (object files).
Then your compiler builds those object files into a brand new XXX.exe
file that has your code changes included. The old .exe will only run
your code with the info it has in it. So yes, if you want to make code
changes, you have to compile or your changes will show up.
.cpp files are C++ code files, different codes use different file
extensions.

Putting code on a server or running under windows:
A server is like a computer that a business or private person has setup
usually for internet purposes, but can be used for other things too.
They usually run some form of linux/unix such as redhat just to name
one..... There are people on the internet that have servers setup just
for other people to run muds on, and they usually have a monthly fee
they charge for a certain amount of space they allot to each of thier
paying customers. The money goes to pay for upkeep on the machine, and
servers are not cheap to buy or run and keep connected to the internet
24 hours a day and 7 days a week. Sometimes you can get more space for
more money, or less space for less money. If you want other people to
be able to log onto your mud, then your best bet is a server. It is
possable for a very small amount (as in 1 to 5 or so) to log onto your
mud that is running on your home computer with windows. It will prolly
run very laggy and they will get annoyed easily at how long it takes
one command to go through, but it can be done. There is a file on
windows computers that will check to see what your IP address is so that
you can give it to others that you want to be able to log onto your
home computer. To use this file, open a MS-DOS window from your start
button, then change into your windows directory and run the ipconfig.exe
file. If you double click on the exe file from within windows explorer,
the file will open a DOS window and close so fast that you will not be
able to read it....so open a DOS window first, and the information will
be in the window for you read. Some people with an ISP provider will
have ISP addresses that change every time they log on, other people with
other kinds of connections to the internet, will have ISP addresses
that are always the same. It all depends on what kind of internet
connection you have as to whether or not your ISP address changes.
A server always has the same ISP address as it is always connected to
the internet.

Putting windows code on a server:
If you start out by working on your files on your home computer under
windows and then decide you want to put your mud up on a server, you
will need to fix your windows files so that they can be read on the
server. I have not done this myself....but I have heard others say
that all you have to do is open those windows files in your servers
editor (such as joe, pico, vi...I think those are right....been awhile
since I messed around with them on a server) and save them in your
editor. If you have saved a file in windows wordpad NOT in the 'text
only' format, then that file may not be useable at all....sometimes
windows will add symbols to the start or end of a file that it reads
and they will mess up the whole file and make it not readable by other
editors.

End:
So all in all making a mud requires a lot of learning and work on
your part....what I have said here is just the first of things that
are needed to do a mud. There are all kinds of things you have to learn
to run a mud....so many I can not list them all here....some as simple
as learning all the immortal commands and how to use them....others
more complicated like how to use a debugger, gdb, backtrace, and
corefiles to stop or find what is crashing your mud. So much to learn
that really one person could not teach someone how to do it all. The
best thing to do is try it on your home computer, play around with it,
try to figure stuff out on your own, read everything you can get
your hands on that deals with what you are doing, join mailing list for
help on things you can't figure out by yourself, but don't forget that
muds are a game and are for having fun.....so don't forget to have fun!





Back to my Homepage


Feel free to email me with any comments, questions, corrections, or additions at...