Top Mud Sites Forum

Top Mud Sites Forum (http://www.topmudsites.com/forums/index.php)
-   MUD Coding (http://www.topmudsites.com/forums/forumdisplay.php?f=9)
-   -   Building Mud From Scratch (http://www.topmudsites.com/forums/showthread.php?t=350)

Khadgar 06-20-2003 07:36 PM

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

Ingham 06-20-2003 09:10 PM

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.

KaVir 06-20-2003 09:33 PM

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.

Teelf 06-21-2003 01:02 AM

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.

Koryon 08-04-2003 07:54 PM


Kylotan 08-05-2003 04:29 AM

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.

Ingham 08-05-2003 08:49 AM


Koryon 08-05-2003 10:09 AM


Yui Unifex 08-05-2003 01:51 PM

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 =).

Koryon 08-05-2003 03:21 PM


Ingham 08-05-2003 11:31 PM



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

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright Top Mud Sites.com 2022