|
|||||||
This is a discussion on "Building a new MUD" in the Top Mud Sites MUD Coding forum : 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)... |
|
You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our MUD community today! If you have any problems with the registration process or your account login, please contact us. If you are a registered member of the old TMS forums, please click here
|
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 |
|
Member
|
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) |
|
|
|
|
|
#2 |
|
New Member
|
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 |
|
|
|
|
|
#3 |
|
Member
Join Date: Apr 2002
Home MUD: DartMUD
Posts: 86
![]() |
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. |
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Apr 2002
Posts: 346
![]() |
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. |
|
|
|
|
|
#5 |
|
New Member
Join Date: Jan 2003
Location: New York (state, not city)
Posts: 17
![]() |
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?
|
|
|
|
|
|
#6 |
|
New Member
|
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. |
|
|
|
|
|
#7 |
|
Member
|
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 |
|
|
|
|
|
#8 |
|
Member
Join Date: Apr 2002
Home MUD: DartMUD
Posts: 86
![]() |
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. |
|
|
|
|
|
#9 |
|
Member
|
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? |
|
|
|
|
|
#10 |
|
Member
|
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 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 |
|
|
|
|
|
#11 | ||||
|
Member
|
Few things in here I'd like to comment on..
Quote:
Quote:
Quote:
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:
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. |
||||
|
|
|
|
|
#12 |
|
Member
Join Date: Apr 2002
Location: Chicago, Illinois
Posts: 152
![]() |
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... |
|
|
|
|
|
#13 |
|
Member
|
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 |
|
|
|
|
|
#14 |
|
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.
|
|
|
|
#15 |
|
Member
|
Raith? Are you my Raithy-raith from the place where Paia reigns?
|
|
|
|
|
|
#16 |
|
Posts: n/a
|
Yup
|
|
|
|
#17 |
|
New Member
Join Date: Sep 2003
Posts: 6
![]() |
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!
|
|
|
|
|
|
#18 |
|
Member
Join Date: Apr 2002
Home MUD: DartMUD
Posts: 86
![]() |
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. |
|
|
|
|
|
#19 |
|
New Member
|
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 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. |
|
|