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 06-20-2003, 07:36 PM   #1
Khadgar
New Member
 
Join Date: Mar 2003
Posts: 29
Khadgar is on a distinguished road
I am interested in building a mud from scratch using C++ programming language during college but I am not quite sure where to start.  Currently, I am just learning the language with a book I bought and I am going to take a class pretty soon on it.  My question goes out to everyone that has built a mud from scratch.  Where did you start exactly?  I have so many different ideas I am not sure where to begin.  Perhaps somebody has reference to early codebases I could glance at?  Any help and/or advice would be greatly appreciated.  Thanks in advance.  

Khadgar
Khadgar is offline   Reply With Quote
Old 06-20-2003, 09:10 PM   #2
Ingham
 
Posts: n/a
Where to start? Well, the most common mistake people make is to jump into something head first and code their way through it by brute force. Not smart. First plan out some things and ask yourself some horribly obvious yet revealing questions.

What? What do you REALLY want? A standard code base? Do you want character data stored in a database or as files? Do you want things to be persistant or do you want to add in the capability to reset things automagically at set times? Or perhaps both?

Why? Why cough up a code base from scratch while there are already decent codebases available. (or so they say, haven't touched a MUD in three years...) A reason might be to avoid legal hassles, as that kind of crap regulary rears it's ugly head on the forums. Make a nice small assesment of reasons, keeping in mind that planning, building and MAINTAINING a code base will cost you allot of time, grief and potentially money. Compilers, debuggers, source management software and all that doesn't grow on trees unless you are a masochist and code completely with OSS.

How? This is where you made your first mistake already; (sorry to be kind of blunt here) You first need to know what you want, how you want it and how you plan to keep it, before you can even start to think about ANY language. The programming language is inferior to the actual goal you're trying to achieve, for it is nothing but a tool to achieve that what you want. Pick the right tool for the right result.

When? Give yourself a REALISTIC deadline when you want to see some results. Keep it realistic, if you want unrealistic deadlines you should become a full time programmer instead. It's much easier to work when you've got a set date, makes for WAY easier planning and it's a nice a simple form of self-disipline.

Lots of other things... But it's 03:07 and I'm knackered. Zzzz.
  Reply With Quote
Old 06-20-2003, 09:33 PM   #3
KaVir
Legend
 
KaVir's Avatar
 
Join Date: Apr 2002
Name: Richard
Home MUD: God Wars II
Posts: 2,052
KaVir will become famous soon enoughKaVir will become famous soon enough
I started by joining a few muds as a staff member, and getting familiar with general mud coding. After a few months of that, I took a stock mud and had a play by myself. After about five years of developing that mud, I wrote another one from scratch (just a small one).

Then I got together a team, spent about a year and a half working on the design of a new mud, followed by another year and a half of coding (once again from scratch). It's not really playable yet, but it's coming together quite nicely.

But the short of it is, expect to put in a lot of time and effort. The same is true of any decent mud, but with a scratch-written mud you'll have to put a lot of time before you even see any results.
KaVir is offline   Reply With Quote
Old 06-21-2003, 01:02 AM   #4
Teelf
Member
 
Join Date: Apr 2002
Location: Seattle
Posts: 32
Teelf is on a distinguished road
I started by printing out portions of the stock Diku codebase and I would go through it at the same time I was taking my programming class.  I ran through the code from the mindset of a player.  Figuring out how logging in works, finding out how a player typed command turns into mud action, etc.  I'd make little notes here and there, look up stuff in my text book, ask someone, or whatever I needed to do to understand what was going on.

When I decided I understood enough of the 'big picture'  I figured a good place to start my own would be to make a C++ server class.  The actual socket code isn't teriblly complicated so it turned out to be a good place to start.  Then I added a 'Mud' class I think.  It was mostly empty but provided a place to start game type stuff.  Then I would add stuff piece by piece.  I rewrote all of the early stuff at least a couple times and am always wanting to 'improve' something or other, but that's the way it goes.

That's how I started.  Maybe it will help.  Good luck.
Teelf is offline   Reply With Quote
Old 08-04-2003, 07:54 PM   #5
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
Koryon is offline   Reply With Quote
Old 08-05-2003, 04:29 AM   #6
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
Hmm.

There aren't many decent codebases out there, for a reasonably demanding definition of 'decent'. I've not seen any Diku derivative that wasn't a horrible mess, and the general scheme of polling and ticks is horrible. Not to mention the fact they're nearly all in C (which is fine for those who like playing with pointers and fixing memory leaks rather than adding gameplay logic), full of hard-coded choices, and rely on non-standard data formats, often incompatible across very similar versions. There are some nice codebases out there but they are generally unfinished because it's just 1 guy working alone.

Coding on OSS is not a 'masochistic' option. Once installed, KDevelop is not significantly worse than Visual Studio 6 in any way that I can discern. And Source Safe is no better than CVS (which can also be managed by KDevelop). So what's missing? I don't want to get into an argument over open source vs. proprietary software, but I certainly don't think the quality or usability gap is as big as you make out. Visual Studio and Borland C++ Builder are just wrappers around console mode compilers too.
Kylotan is offline   Reply With Quote
Old 08-05-2003, 08:49 AM   #7
Ingham
 
Posts: n/a
  Reply With Quote
Old 08-05-2003, 10:09 AM   #8
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
Koryon is offline   Reply With Quote
Old 08-05-2003, 01:51 PM   #9
Yui Unifex
Senior Member
 
Join Date: Apr 2002
Location: Florida
Posts: 323
Yui Unifex is on a distinguished road
Send a message via ICQ to Yui Unifex Send a message via AIM to Yui Unifex
I think installing VC++ is a lot more of a PITA =). You have to physically get up and find the CD, then laboriously insert it into the CDROM drive.

All I have to do is "apt-get install gcc" (or "apt-get upgrade" and it'll be automagically upgraded...). Or more likely on my servers, "cd /usr/ports/lang/gccXX;make install". And I'm done!

Always install new compilers in a different location than the current one, so you have a strategy in case the new one doesn't work =).
Yui Unifex is offline   Reply With Quote
Old 08-05-2003, 03:21 PM   #10
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
Koryon is offline   Reply With Quote
Old 08-05-2003, 11:31 PM   #11
Ingham
 
Posts: n/a
  Reply With Quote
Reply


Thread Tools


Building Mud From Scratch - Similar Threads
Thread Thread Starter Forum Replies Last Post
Mud building Sesshomaru MUD Builders and Areas 1 11-16-2004 11:56 AM
Building a new MUD Mierza MUD Coding 42 01-11-2004 01:59 PM
Building Tocamat MUD Builders and Areas 9 02-22-2003 09:02 PM
MUD: Starting from scratch. Valarauko Newbie Help 0 02-02-2003 11:58 AM
Making A new Mud from scratch Xanferious Advertising for Staff 1 08-17-2002 09:34 PM

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 09:46 AM.


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