A MUD engine in python

ErisMUD is written in Python and supports many features: Rooms, NPCs, inventory, player stats and skills, a basic damage/healing framework, ANSI colors, help system, etc. SQLite is used to store the data, so no files are required for building (unlike LPMUDs). Short and easy internal commands take care of the development and maintenance.

This game was listed as missing in action: it was no longer available when the site closed.

License: free
Requirements:
  • Python
  • SQLite
  • pysqlite

Sound:Play in X:Play in Console:Multiplayer:Network Play:3D Acceleration:Source Available:
nonoyesyesyesnoyes
Suggest an update

Comments

How does this hold up as far as stability and security? Does it handle MCCP compression? Is there a similar clean separation of the server and the game, as in LPMud, or is it more monolithic like a DIKU derivative?
I've been fooling about with muds for ages, and I like LPMud a lot, but writing a mu* in a C-like language seems just plain wrong. A mu* cries out for a much more LISP-y language, and seeing that the most LISP-like mud system I've seen is in the DUMB server, which runs on a Java VM and hasn't been maintained in 5 years, it's right out. Something Pythonic sound likely to be worth a switch to me.
Re: General questions posted by anonymous on Jun 14 2005 2:29 PM
I'm very concerned about security but unfortunately, this is telnet, not SSH. The passwords are encrypted using SHA and since it runs under Python, I don't think gaining a shell access would be easy. The next release will be wrapped in a shell script that chroot-jail the process to a single directory.

I'll try to read about compression schemes but for now, none is used.

The design is monolithic though distinctly separating the server from the "MudOS" is a future goal.

I've toyed with LPMUDs for years but I wasn't happy with the filesystem design, I prefer using a database. Also, LP development is terribly slow and a lot of servers/OS are proprietary.

Thanks for the comments.

~Manu

Re: General questions posted by Elanthis on Jul 18 2005 6:54 AM
MCCP is pretty much just a zlib stream with a little bit of telnet glue to manage it. I'm fairly sure Python has a module for zlib.
Okay, I've now been trying with three different usernames to log in (the last one being random characters) but none works. How to start there?
Re: BetweenMUD posted by anonymous on Jun 15 2005 3:45 AM
Which client are you using? What is the output, exactly? Also, did you install SQLite/pysqlite?
Re: BetweenMUD posted by blindcoder on Jun 15 2005 5:59 AM
I've been telnet'ing to between.ath.cx on port 4000
Re: BetweenMUD posted by anonymous on Jun 15 2005 10:13 AM
To amplify on blindcoder's remarks, it seems that one of the first things that needs work in erismud is character creation. How can we test out at between.ath.cx:4000 if we can't even log in a new character?
Re: BetweenMUD posted by anonymous on Jun 15 2005 5:15 PM
Darn, you were both right. Player creation had not been tested in a while because all testers already had characters. I removed something important and that broke character creation. It works now, the new release will be fixed. Meanwhile, you can try at the usual between.ath.cx.

Thanks for the bug finding. :)

Re: BetweenMUD posted by blindcoder on Jun 15 2005 11:06 PM
Now I get "Connection refused" :(
Re: BetweenMUD posted by anonymous on Jun 18 2005 11:43 PM
It's fixed now, just so you know. :)
I'm not sure I get the point of this. The blurb essentially reads something like, "to ensure diversity in the Eris community we've decided not to include any of the features that most other servers have built in."

That's supposed to be a good thing?

Re: ErisMUD posted by anonymous on Jun 15 2005 5:42 PM
Yes. I don't want to see 10 MUDS with the same combat system, same skills system, etc. Like a lot of old Mudlibs, the core of the game is left to developpers.

That said, once I get a stable release that I'm satisfied with, I may work on a basic stock RPG system.

~Manu

Re: ErisMUD posted by Elanthis on Jul 18 2005 6:44 AM

On the other hand, this means that developers have to spend more time re-implementing code (and probably all making sub-optimal half-baked implementations) and less time implementing the actually important parts of the MUD - the world and story.

Shipping a stock ruleset would probably be a good idea, once you're comfortable working on it. Nobody would be forced to use it, but it would probably be a good thing not to force MUD creators to reinvent the wheel.

Re: ErisMUD posted by anonymous on Jul 18 2005 9:58 AM
Well I hate to have to say it, but you're probably not going to see many ErisMUD's at -all- without including at least the bare minimum of features that other MU*'s have.
Re: ErisMUD posted by anonymous on Jun 16 2005 1:27 PM
Yeah it's a good idea, didn't you ever notice how muds run on DIKU-derivative servers are almost all identical? The only such muds that stand out as different are the few that have been almost totally rewritten from the ground up and scarcely have any DIKU code left.
The DIKU-based muds were quick and easy to set up, but difficult to set up differently, which was a major factor in the glut of awful muds in the late 90's. If you want to set up a mud, it's either going to be a ton of work, or a very generic mud. Pick one.
Has anyone tried both ErisMUD and moop (moo in Python)? I was wondering what the strengths of this one versus the other are. It looks like moop (found on SourceForge http://moop.sourceforge.net/) is fairly easy to use. Is there a big advantage to using an SQLite database for a mud?
Re: comparison to moop? posted by Elanthis on Jul 18 2005 6:41 AM

A database on its own has a lot of advantages. The truly big MUDs, the professional ones like GS IV and Dragon Realms, all run off of Oracle DBs. The database lets you efficiently manage large amounts of data.

So far as using SQLite, it's an excellent database engine for non-concurrent usage. Where-as something like GS IV is extremely heavily loaded (well, it _used_ to have 5,000+ players on at a time, back before the graphical MMORPG revolution), the average MUD doesn't need that kind of concurrency and SQLite is one of the best choices to use for a database for that work load.

dont feed troll

The author added threading. Unfortunately.

First, there is not a single good reason for threading. The only threaded behaviour implemented so far is something that should be timer based, not thread based. I.e., every 10 seconds of the game loop running, it should execute the heal code. Absolutely no need for threads at all.

Second, the threading is buggy. The simplistic heal routine has a race condition. The two SQL statements are not in any sort of a transaction, so it's possible for the state of the SQL tables to change between their execution (it's a thread, that happens).

I also am confused about the style of the code in the healing method... why is the author assigning what should be local variables to the self object?

The healing method could also just be made simpler by using better SQL. Instead of querying the current HP with one SQL call, and then updating it with another, you can just use something like:

"UPDATE pnames SET curhp=curhp+1 WHERE p_id=%s AND curhp<maxhp" % (sess.p_id)

That removes the race condition, reduces the amount of code to maintain, reduces the number of SQL statements thereby increasing efficiency, and doesn't have a chance of pushing the current HP over the maximum. Just take that out of the thread and implement real timer handling code, and you'd have a great implementation of healing. If the author would like some more design feedback and assistance, he should head over to mudmagic.com and post on the forums there.

The MUD doesn't seem to implement telnet at all, yet. It is required for certain features (echo negotiation for password entry, MCCP, etc.).

The biggest problem is that all clients are speaking telnet, and the server needs to understand that or else risk potential breakage. At the absolute bare minimum, there needs to be IAC escaping. If the byte value 255 is ever sent out, it *must* be turned into the sequence IAC IAC (two bytes of value 255). Otherwise, the client will try to interpret the byte and those following it as a telnet command. When the server receives data, it also needs to understand IAC. It needs to turn an IAC IAC sequence into a single IAC byte. It needs to catch or ignore the three-byte IAC WILL, IAC WONT, IAC DO, and IAC DONT sequences. It needs to understand the IAC SB command and that it has to ignore everything up to IAC SE (and don't forget to handle IAC IAC escapes inside the subrequest!). It needs to handle or ignore the other two-byte IAC commands.

I wrote a quick-n-dirty explanation of the issues of implementing telnet at http://www.awemud.net/wiki/Home/Projects/ZMP/Implementing+Telnet. Additionally, my project PyCL at that site is a Python MUD client with a telnet parser and sender in it; the author of ErisMUD is free to reuse that code (under its license terms) or use it for studying purposes.

Re: telnet posted by anonymous on Jul 18 2005 9:57 AM
No offense or anything, but if you're going to make a separate post about every complaint you have regarding the code, maybe you could just...I don't know...actually e-mail the author and discuss it with him instead, rather than waste space normally used for -user- discussions?
Re: telnet posted by Elanthis on Jul 18 2005 10:22 AM
Because then other people who might not be aware of these programming issues wouldn't learn about them. Other people who program in Python or SQL read these forums, after all. This kind of discussion should always be public and accessible to others for educational purposes. I have zero interest in spending my time to help only one person. :-)
Re: telnet posted by anonymous on Jul 18 2005 10:32 AM
Heh. Now that's a -very- telling statement.

Maybe you're just bringing up these "programming issues" publically because you're hoping that the people catching it will shy away? Perhaps make use of the "better" solution that you're offering?

Competition's always good I guess, but you really ought to grow up.

Re: telnet posted by Elanthis on Jul 18 2005 1:06 PM

Maybe you've heard of this Free Software/Open Source thing where people contribute to their neighbor projects and help each other out. That being why I explained why the author's approach was flawed and described how to correct it, instead of just saying it's broken and to use something else. My sharing of my knowledge and experience with others might *gasp* actually be altruistic in nature.

If that's a concept you can't understand, that's your own loss. ::shrug::

Re: telnet posted by anonymous on Jul 19 2005 4:17 PM
It's interesting that you'd claim that you're trying to help the author out, when not a few posts before you said you didn't have time to do so.

Not that I agree with the poster or anything, but you're not making a very convincing argument either.

Re: telnet posted by jrodman on Jul 18 2005 1:36 PM
This package is intended for further development; it's not a complete game. Those who use it will be developers. As a result, discussing problems and resolutions in the design of this game creation tool is completely apropos to any forum disussion of it.
Re: telnet posted by anonymous on Jul 21 2005 3:26 PM
Hi, I'm the author. I have a *mailing list* for this sort of discussion. OSS is not about posting programming issues everywhere you can.
That aside, there are good comments. I'm far from being a python guru, this is my first public project. I'll reply in depth on the mailing list, which you can subscribe to by visiting the ErisMUD website.
PLEASE do not answer me here, this is just wasting space.

Log in or register to rate this game or post a comment.