Top Mud Sites Forum Return to TopMudSites.com
Go Back   Top Mud Sites Forum > Mud Development and Administration > MUD Coding
Click here to Register

Reply
 
Thread Tools
Old 01-07-2003, 07:33 AM   #1
Mierza
Member
 
Join Date: Jan 2003
Location: Hope Valley, Perth, Australia.
Posts: 33
Mierza is on a distinguished road
Send a message via MSN to Mierza
Exclamation

I'd like to build my own mud, I have a few resources (people inclined) available to help, aslong as I know what I need.

So.. where exactly do I start?

All replies much appreciated.

~Jade (aka Mierza)
Mierza is offline   Reply With Quote
Old 01-07-2003, 11:07 PM   #2
Emit
New Member
 
Join Date: May 2002
Location: Kentucky
Posts: 14
Emit is on a distinguished road
Send a message via AIM to Emit
well, there lots of work to do. if you want to start from scratch completely, here are a few steps that need to be accomplished, and the order i would probably try to do them in.

1) write the main function. At this point it doesn't really do anything but call the game loop.
2) write the game loop function. just have it an empty loop that you can add stuff to later. have it sleep for a tenth of a second or so every loop.
3) write all your socket code. This would be the most unfun part, probably. maybe borrow some socket code? it needs reading from sockets, writing to sockets, telnet negotiations, a struct for each connected socket, etc.
4) add fields to a the descriptor struct for a player name and password
5) write some functions to save and load a player (startup info probably name and password now, add details later).
6) write a nanny to login old characters and create new ones.
7) write a command interpreter.
8) write a who command and a chat command.

after this, things should progress smoothly.
you'll need an update handler, misc handling functions, a database of mobs/items and ways to save/load/modify it, rooms, information commands, object commands, move commands, and the rest should come as issues arise

most muds are grown like gardens rather than built like buildings, plant the first seeds and then add what you like
Emit is offline   Reply With Quote
Old 01-08-2003, 02:54 AM   #3
Ogma
Member
 
Ogma's Avatar
 
Join Date: Apr 2002
Home MUD: DartMUD
Posts: 86
Ogma is on a distinguished road
Arrow

So, Emit, if someone tells you they need a place to live, do you tell them how to build a house?

There are easier ways to start a mud, Jade.

First get your favorite flavour of free Un*X operating system and install it on an extra computer...it doesn't really need to be state of the art.

Next, download your favorite codebase Diku, Merc, Smaug, Rom, or ldmud (which I recommend). You can find all of these in source form on the net. If you get ldmud, you'll also need mudlib, also available on the net.

Next, learn to program in C or LPC and hack away.

Oh yeah, you'll also have to get some sort of persistant net connection.
Ogma is offline   Reply With Quote
Old 01-08-2003, 08:33 AM   #4
Orion Elder
Senior Member
 
Join Date: Apr 2002
Posts: 346
Orion Elder is on a distinguished road
Just wanted to point out there are a lot more options than just the ones that Ogma mentioned.

Not mentioned, that I can think of off the top of my head, are (in alphabetical order):

AFKMud
Chronicles *
Circle
FUSS (Fixed Up SMAUG Source)
GodWars
ResortMUD and CalareyMUD(they're on there SOMEWHERE)

As mentioned, these are just a few off the top of my head. There are numerous codebase listings all over the net. More information about what exactly you're looking for would be helpful in pointing you to something that might suit your needs.

And, as Emit mentioned, there is always the option of building your own codebase from scratch.

* - Chronicles is my own derivative and is a pretty cleaned up version of SMAUG that has been trimmed down quite a bit, and had some new features added.
Orion Elder is offline   Reply With Quote
Old 01-08-2003, 10:14 AM   #5
Adelai
New Member
 
Join Date: Jan 2003
Location: New York (state, not city)
Posts: 17
Adelai is on a distinguished road
Here's a random question. Which wuld you say is easiest to learn? Knowing some code (C mostly), but having been forewarned about the complexity of MUDs, is there one less... complex than the rest?
Adelai is offline   Reply With Quote
Old 01-08-2003, 07:24 PM   #6
Lodes
New Member
 
Join Date: Apr 2002
Location: California
Posts: 15
Lodes is on a distinguished road
Send a message via AIM to Lodes
Well knowing you really well Mierza, I thought i'd reply. (on a seperate note, i'll be contacting you on your current mud.)
Muds are indeed some complicated piece of code but after you have worked a lot with a codebase you get to know it quite well and understand what is needed.
Which codebase you choose really depends upon what you want it to already have, which features on that codebase do I want compared to that other codebase.
Now, answering your question maybe a bit more precisely. Any mu* is complex because first it is a server/client application and the current standards are relatively high on how a mud should be. I know you currently are an immortal on that mud I play with you, and I will be contacting you. I hope what I said made sense and maybe also helped some other people.
On another note, it does cost some money to run a mud and a lot of dedication. And now as an advice, with your changes, start with small things, you will learn a lot about different part of the code and then will be able to progress into making some bigger changes. Remember that some codebases are just ugly to look at but I am thankfull to the creators as they sure saved all of us a lot of time, and gave us inspiration to continue on.
-- edit - My first post on this board, really bad formatting which I hope I fixed.
Lodes is offline   Reply With Quote
Old 01-08-2003, 08:09 PM   #7
Mierza
Member
 
Join Date: Jan 2003
Location: Hope Valley, Perth, Australia.
Posts: 33
Mierza is on a distinguished road
Send a message via MSN to Mierza
Arrow

Ha, my gawd.. all you people know who I am and I've no idea who you are *fret*, leave your name so I can contact you both likewise?

Thanks for the replies guys, I guess I've a long way to go before my coding exp. moves from mIRC to Mu* bases.. ah well.

So.. if anyone wants to help create a newage/modern sci-fi game, with high RPG, with expectations of being totally awesome. (I'm fussy when it comes to games, either the best we can put together, or nothing at all.) Gimme an email to jade@shatteredequinox.com

~TY, Me
Mierza is offline   Reply With Quote
Old 01-08-2003, 09:23 PM   #8
Ogma
Member
 
Ogma's Avatar
 
Join Date: Apr 2002
Home MUD: DartMUD
Posts: 86
Ogma is on a distinguished road
Yes, Orion, I only mentioned the major MUD codebases. I also failed to mention MUCK (Glowmuck or fuzzball), Mush, Mux, MOO etc. so as not to confuse the issue.

Mierza,

If you want to do something significantly different than the standard medieval/fantasy setting, I'd recommend ldmud or MudOs (another one I failed to mention). LP style muds are much more flexible.
Ogma is offline   Reply With Quote
Old 01-09-2003, 03:32 AM   #9
Mierza
Member
 
Join Date: Jan 2003
Location: Hope Valley, Perth, Australia.
Posts: 33
Mierza is on a distinguished road
Send a message via MSN to Mierza
I need to -learn- to code..

1. Is there anything similar to mIRC scripting that will suit my needs; or
2. Where can I learn? (Desired online, free, etc. Or tuition from an exp. friend'd help too.); or
3. Anyone wanna code?
Mierza is offline   Reply With Quote
Old 01-12-2003, 11:28 PM   #10
visko
Member
 
Join Date: May 2002
Posts: 98
visko is on a distinguished road
Send a message via ICQ to visko Send a message via AIM to visko
People always talk about how incredibly hard coding for a MUD is, but I think that's for job security more than anything

The fact is, this forum combined with a small amount of previous knowledge about C will normally get you to the point where you can start biting off some fairly hefty sections of code and redesigning them quickly and with a lot of success. MUDs are only hard because a lot of people aren't comfortable working within a very complexly-created program that was specifically designed to have everything cross-connected with everything else at the code level. And even a lot of advanced programmers who haven't had a lot of experience with structures will complain a lot, simply because these things, while not obscure or hard to understand, are just not things a lot of coders ever have to get into.

I started programming on MUDs, and learned about structures before I even knew what file I/O was. (I still have serious knowledge holes as far as file I/O goes, and I'm about to post a question related to that, btw. This place is great for answering q's, like I said ) Once you get a pretty good idea of how data flows through functions and is interpreted by each of them, and you get a decent enough picture of how structures work, how to access them, and how to use them to full potential, the rest of the code is gravy.

Also: if something looks like it would be hard to do, someone's probably already written the hard part for you. This is true at least in Rom, which I'm currently taking apart and putting back together; fread_string and fread_number have now made me very reverent towards the guys who started ROM out, heh.

MUDs are complex, sure, no one's arguing that. Hard? Not really. The thoughtfulness of most code bases in their design and understanding of newbie coders, combined with the support that you get from people who are very fervent about this type of gaming, namely this site and a few other less cool ones, are all you need to become a fairly creditable MUD programmer in not a lot of time. So don't worry; grab a linux account somewhere, grab a code base, and run with it.

-Visko
visko is offline   Reply With Quote
Old 01-27-2003, 08:20 PM   #11
Koryon
Member
 
Join Date: Apr 2002
Location: Canada
Posts: 50
Koryon is on a distinguished road
Send a message via ICQ to Koryon Send a message via MSN to Koryon
Few things in here I'd like to comment on..

Quote:
Originally Posted by
3) write all your socket code. This would be the most unfun part, probably. maybe borrow some socket code? it needs reading from sockets, writing to sockets, telnet negotiations, a struct for each connected socket, etc.
No way, I think this is definitly the best part. Well, in my opinion anyway, writing 3 lines of code and having a new fancy channel in your mud is nowhere near the acomplishment of writing a ton of low level code and seeing TCP comms as the result.

Quote:
Originally Posted by
4) add fields to a the descriptor struct for a player name and password
I don't mean to pick on you Emit, but do you know what a descriptor really is? (Honestly, this isn't a flame, I want to know what you think one is.)

Quote:
Originally Posted by
) write a nanny to login old characters and create new ones.
Again, sorry for picking on you

It's funny that you would write nanny, now, I'm not gonna harp because you have your favourite dikurivitive open or in your head as you write this. You see, nanny is just an oddly named function for a finite state machine. FSMs are pretty basic building blocks to, er, everything dynamic that aren't always learned by people who pick up programming on thier own. They're better taught in (digital) electronics, but they're still important, and that's exactly what nanny is. It determines where input should go (command interpreter, handling login status itself, text entry for note systems) based on previous inputs. For more information on FSMs you can look up books/webpages on discrete structures/fundamental logic.

Re: Already posted codebases

Two options not already presented are CVagrant and Glad. CVagrant is mine, and is quite minimalistic, It's basically what Emit described and not much else. Glad is KaVir's creation, and is a bit (well, more than a bit) more advanced than mine. CVagrant you can get from www.gryphonmud.com/~koryon/cvagrant.tar.gz and I'm sure you can get Glad from kavir.org, although I forget the exact link.

Quote:
Originally Posted by
Which wuld you say is easiest to learn?
This is a loaded question.. and doesn't have anything to do with complexity of muds, it's entirely on the programming style (When coding, you can focus on various things, time to run, time to program, maintainability, portability, reuseability), most is centered around "time to program", which means among other things it usually isn't documented well. Basically, CVagrant is a lot less complex then Glad, and Glad less complex then one of the popular codebases. But Glad (the "cleaned up 16k version") is by far the "easiest to learn" because of the amount of work KaVir put into commenting it.

But as for which of the popular codebases is the easiest? Take a potshot and pick one, cause somewhere around 50k lines of code you start to really just need to know the language to work your way around the code. (Or you're gonna learn, REAL fast)

As for learning to code, buy a book and read it, read it, and read it (and try the examples), download a mud codebase you at least know how it works from playing it, and look through it AS you read the book. If you just start with a mud codebase, you're eventually going to end up getting a book anyway, so skip the middle step. A good reference book is always a good investment anyway, I've used my perl book so much I'm going to need to replace it soon .
Koryon is offline   Reply With Quote
Old 01-27-2003, 10:51 PM   #12
Terloch
Member
 
Join Date: Apr 2002
Location: Chicago, Illinois
Posts: 152
Terloch is on a distinguished road
Honestly, regardless of codebases out there, or any of OUR preferences, this is what I would recommend you do.

Take whatever code you are the most familiar PLAYING on and at least start with that. You know what things do, what messages are given, etc, and you can find that in the code and by reverse engineering it, you can start to figure out just what makes it all tick. Modify and change it, get comfortable with it, and THEN decide if you want to go with it, or something different...
Terloch is offline   Reply With Quote
Old 09-24-2003, 03:49 AM   #13
Mierza
Member
 
Join Date: Jan 2003
Location: Hope Valley, Perth, Australia.
Posts: 33
Mierza is on a distinguished road
Send a message via MSN to Mierza
Well, this is coming a year too late, but I'd like to thank everyone that applied.

I've learned alot more about MU*'s, and hope to use this experience to put a developed concept that I have into play, to offer something new for everyone to look at.

I'll post some more about my concept in another thread somewhere, and eventually hope to find some talented coder/admin staff that are interested in developing something original.

Also a big thanks to Lodes for all his help outside this thread I know the MU* he's working with now is going to be a stunner for any fans of Star Wars.
Mierza is offline   Reply With Quote
Old 09-24-2003, 06:02 PM   #14
Raith
 
Posts: n/a
Harr Harr..Yes. You will need to surround yourself with competent and dedicated staff members, or else the staff will slack off and the MUD will disappear. That will just result in a waste of resources.
  Reply With Quote
Old 09-25-2003, 02:33 AM   #15
Mierza
Member
 
Join Date: Jan 2003
Location: Hope Valley, Perth, Australia.
Posts: 33
Mierza is on a distinguished road
Send a message via MSN to Mierza
Raith? Are you my Raithy-raith from the place where Paia reigns?
Mierza is offline   Reply With Quote
Old 09-25-2003, 05:32 PM   #16
Raith
 
Posts: n/a
Yup
  Reply With Quote
Old 10-16-2003, 10:36 PM   #17
Blade
New Member
 
Join Date: Sep 2003
Posts: 6
Blade is on a distinguished road
I am trying to learn Python programming from scratch. I have no coding exp at all. I want to make a mud with Python programming. I found a site with a great tuitorial, but I have no idea what so ever how to even go about making a mud...Can any of you help me. I still have a ways to go anyway because I have to learn how to program first. Just out of curiosity, how long do you all think it will take me to learn how to program in Python. I am a somewhat fast learner and understand things pretty good? If any of you have sites, or any help suggestions at all, please message me or email me. Thanks!
Blade is offline   Reply With Quote
Old 10-17-2003, 01:03 AM   #18
Ogma
Member
 
Ogma's Avatar
 
Join Date: Apr 2002
Home MUD: DartMUD
Posts: 86
Ogma is on a distinguished road
Not to be flippant or discouraging, but asking a question like this is like saying 'I'm just learning to drive a car, how long will it be before I can drive in the Indy 500?'

There is far more to learning to program than just learning the language. It is a unique way of thinking and solving problems. The programming language is just the tip of the iceberg. Once you know how to program, learning another language is a piece of cake.

Chosing Python as a first language is a good choice, it lends itself quite well to learning good habits and techniques. However, don't expect to be coding a mud in a couple weeks or months.

I wouldn't recommend coding a mud in Python though. It'd make a good embedded scripting language, but it doesn't lend itself to the fiddly bit bashing that communications protocols require. If I had to code a mud from scratch, I'd go with C++.

On the other hand, if I were building a mud, I wouldn't code it from scratch either. Chose a codebase and built off of that. For most of them you'd need C, but I think the best way to go is use LPMUD or LDMUD and code it in LPC.
Ogma is offline   Reply With Quote
Old 10-17-2003, 02:20 AM   #19
Lodes
New Member
 
Join Date: Apr 2002
Location: California
Posts: 15
Lodes is on a distinguished road
Send a message via AIM to Lodes
If I was writing a mud from scratch, and I had a deadline, I would write it in java.
I am writing my mud in C++ right now. I finished the underlying engine from which any mud could be based on. It was just a lot of copying from code that I had already written and pasted it into a library to link dynamically or statically to the main program.
I don't like using existing codebases because most of the time, I have to rewrite the entire code and the design often does not seem flexible and powerful enough. Heck, my code can only compile on Visual Studio .NET (2002-2003) or gcc/g++ 3.2 or higher, because I am using some of the latest techniques (they might be a few years old but they're the latest ) to provide that power.
There is a lot of power from coding your mud from scratch. Especially considering how much more you can do in 2-5 times less code than existing codebases.

I don't really know how python is suited for muds.. but I am sure you could code one in it. After all some people are coding muds in php (what the heck are they thinking?) - (acutally I know the answer to that, it's just for the fun of it ).
If you are starting out, it is highly recommended that you use an existing codebase. There are some pretty good ones out there. They might be a bit complex at first though if you're learning to code. I know most muds are derivatives of diku but I strongly think that diku has had its time, it's time people start basing their muds off some other more modern codebases or that a very cleaned up version of diku is released. So far all derivatives I have seen are as messy and have so much useless amount of code that it makes me want to puke. It might have been good back in the days, but wake up people!

Enough about my ranting.. I hope you guys got something out of it.
Lodes is offline   Reply With Quote
Old 10-28-2003, 12:13 PM   #20
Kylotan
Member
 
Join Date: Jun 2003
Location: Nottingham, UK
Home MUD: Abattoir (Smaug)
Home MUD: ex-Jellybean (Smaug)
Home MUD: ex-Dark Chambers (Merc)
Posts: 174
Kylotan is on a distinguished road
Send a message via ICQ to Kylotan Send a message via AIM to Kylotan Send a message via MSN to Kylotan Send a message via Yahoo to Kylotan
Quote:
Originally Posted by (Ogma @ Oct. 17 2003,00:03)
I wouldn't recommend coding a mud in Python though.  It'd make a good embedded scripting language, but it doesn't lend itself to the fiddly bit bashing that communications protocols require.
What are you talking about? Python is ideally suited for muds given that it comes with extensive networking and string-handling capabilities as part of the standard library. I'm intrigued to see what 'fiddly bit bashing' you think is required...
Kylotan is offline   Reply With Quote
Reply


Thread Tools


Building a new MUD - Similar Threads
Thread Thread Starter Forum Replies Last Post
The Art of Building Neranz Laverani MUD Builders and Areas 18 08-08-2005 09:13 PM
Mud building Sesshomaru MUD Builders and Areas 1 11-16-2004 12:56 PM
Building a MUD Shlim MUD Builders and Areas 1 08-21-2003 07:22 PM
Building Tocamat MUD Builders and Areas 9 02-22-2003 10:02 PM
Web based building Blobule Advertising for Staff 4 09-18-2002 10:47 AM

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT -4. The time now is 05:30 PM.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Style based on a design by Essilor
Copyright Top Mud Sites.com 2014