Joshua Cantrell's Programming Experience WWW Page


My first UNIX experience with MUDs

Most of my UNIX related programming came from my interest in making my own MUD. Previously, I had been programming under MS-DOS using assembly language and Turbo C/C++.

When I was first introduced to MUDs I was going to MUD Pathetique (now Zee MUD). After I was there for about a half a year someone announced that they were going to make "their" own MUD. My brother and I decided to take a look at it and found out he was running Circle MUD v2.2.

We had found that the MUDs we had gone to lacked many features that text adventures, such as many Infocom games -- Beyond Zork, Planetfall, Stationfall, etc. --, had, so we took it upon ourselves to update our own Circle MUD v2.2. The reason we started with Circle MUD was that we had no knowledge of how to program communication over the internet, so we started our attempt at reprogramming the MUD. A friend we had made at the previous MUD helped give us some suggestions since we shared a similar vision of what MUDs should be like.

After a few months, it became evident that we would have to completely overhall and rewrite the Circle MUD code to do what we wanted (not worth the copyright placed upon it), so we gave up the project and started a new one...

The MUD from scratch

My brother worked on producing a language parser that would work similar to Infocom's games, while I tried to find out how the program communicated over the internet.

My first method to find this out was to cut out all of the code from Circle until I only had the code that did one thing: allowed multiple people to connect and echo what was said to everyone connected. I did this by finding out what every function did by using the on-line manual pages (man pages) in UNIX. Functions that did not seem to do anything were removed and I reduced the code to one file. For my first attempt at writing my own MUD with my brother's first parser, I used this code and tried to make the rooms based on a text database similar to Circle. Soon I found that the parser (which was a C++ class) was hard to work with and decided to wait until my brother could develop a better parser class.

The Experimental Graphical MUD's Beginning

While my brother worked on a new parser, I decided to work on the design for a new type of MUD where everything would have size (rooms, animals, objects, etc.). I spent time racking my brain over how I was going to make doorways have size and other trivial things. This didn't help me go very far, but it did make me think about graphical type MUDs.

I also bought Using C on the UNIX System by David A. Curry to help me produce a better networking C++ class for my brother to use, since he was going to try making his own MUD. Another reason why I bought it was from curiosity about how to spawn jobs to run in the background (I wrote a simple tester that detects when a program crashes and saves the most recent message sent to it as a debugging tool).

While I was doing this I remembered a MUD I had visited previously called Empires MUD (now it's moved to all graphics) that had an ASCII text top down view of things. I found information on ANSI and VT100 escape sequences by posting on USENET, and needed to find some information on how to communicate with telnet. I wanted to tell telnet not to echo (eg., a password). I asked Demon of Empires MUD and he directed me to the TMI2 MUD. I posted on USENET, and at about the same time as I received some useful information from someone at TMI2, I also received some useful information from USENET regarding the ARPA standard for telnet. With these tools I wrote an ASCII graphical program to model lighting in a 3D block world, where I stopped once more, this time because of the lack of time left to me from returning to school at the end of Summer Vacation.

Empires MUD

Another reason for my trouble with finding time to program my own MUD came from my interest in helping Empires MUD become a great MUD. It had many elements that I liked, for example the ASCII text top-down view that moved around with you on ANSI or VT100 mode, and administrators that seemed to be friendly (they had already tried to help with one of my own programming problems). Loranar advanced me to a Wizard to be a part of the team (at the time I was the last non-wizard player who hadn't been deleted from lack of visiting).

I worked hard to learn how to use the MUD-OS programming language. I made some test rooms and soon started working on the town of Sukara. As school became tougher, I decreased in my frequency, yet tried not to fail with visiting at least once a week.

The start of the next semester showed a regained energy to build the MUD amongst the administrators, and I improved and built more on Sukara as I had time to. As school began to overwhelm me again, I was forced to limit my activity again and could only visit at about once a day with programming as time allowed. While I was trying to rewrite some of their code regarding combat, on about February 16, 1996, I found that the MUD had closed its doors to everyone but administrators. This marked the end of my work at Empires MUD. Although I waited for about a month, they had not kept in contact with me, so I came to the decision that I'd rather work on my own project, instead of a project that I can be forcefully separated from.

X Windows and a New Approach

While I was working with empires, they had started to design their graphical client for MS Windows. Because I was now doing most of my work under UNIX and X Windows, I started to look into ways of programming a client for X Windows. After searching for legible code to help me find out how to use pseudo color, I gave up and bought O'Reilly & Associates' Volume 1: Xlib Programming Manual by Adrian Nye. Although this book doesn't show examples for everything, with its help I was able to find out how to use pseudo color (which it warns against using) and better understand other code that I read. I was on a roll, and made an X Window's C++ class and another class for loading Windows BMP graphic files (that's what Empires MUD was using). These C++ classes helped give me a basis for using X Windows as a graphical environment for my programming. (NOTE: I no longer wish to write a client for Empires MUD because I'm holding a grudge against them. *8^P)

Now I'm currently updating and upgrading my X Windows class to handle buttons, terminal windows, dialog boxes, and other necessities that X Windows leaves for the programmer to invent (I haven't found any widgets or code to copy that is good enough for my use, except what comes out of the book I bought). This is where my experience ends (more or less depending on how old this WWW page gets).