Wednesday, 30 April 2008

Stackless Python MUD framework

I've uploaded my Stackless Python based MUD framework to Google's project hosting:

When I was at university and for a few years afterwards, I joined in the effort to work on an LP MUD based on the MudOS driver. As most of the potential of an 'in-development' MUD is defined by the game systems which have been implemented, and I did most of the programming, I eventually inherited control of the MUD.

After a period of time, I became frustrated by the closed environment MudOS provides and the idea of a straightforward scripting language became appealing. So I rewrote the basic elements of the mudlib in Python. There are only a few toy game related elements present in the code.

Over time I developed a few other projects and they have come to be integrated into this framework as I found the time:

  • Code reloading: As MUD code is changed and the files saved to disk, the game framework detects this and reloads the contents of the files.
  • Stackless-compatible socket module: Asynchronous networking support is hidden away behind the standard socket interface through the use of Stackless Python channels preventing them from influencing framework structure in custom ways.
It also has support for connecting to the Intermud 3 MUD network. Although this isn't 100% working at the moment going into an infinite loop when receiving the initialisation updates from the Intermud router.

Anyway, a friend expressed an interest in possibly using it as the basis for his own MUD experiments so I figured I might as well throw the code out there.


  1. @@Oh btw - looks like the latest binary of stackless might not overwrite the python25.dll in windows/sytem32 (I don't think I have any weird permissions set) so it took me a while to find the following error after getting "import stackless" to work:

    IOError: [Errno 2] No such file or directory: 'game - example\\datatables.db'

    looks like some files may have dropped from your distribution -- did you mean to leave those out?

  2. I don't understand what you mean about the latest binary of Stackless. I just install normal Python, then unzip the zip Stackless files over top of it - this way the normal Python dlls are still in system32 but the Stackless dlls override it because they are in the same dir as the exe.

    I do not get the IOError, you need to provide a reproducibility case. I unzipped the zip I uploaded to the Google project hosting web site and ran it fine, logging in.