Screenshot DecafMUD showing off MXP

What is DecafMUD?

DecafMUD is a MUD client written in JavaScript, using either Flash or WebSockets for connectivity, that harnesses the native browser to display output and accept input, rather then a third party GUI system such as Java, Flash, or Silverlight.

What does that mean for me?

For a web developer, it means perfection. Customizing the look of DecafMUD is as easy as writing a bit of HTML and CSS. The client displays its output in an element of your choosing, and doesn't use any hard-coded styling. This gives you the ultimate in control over the appearance of your customized client and the ability to easilly and perfectly integrate the client into your existing site.

Flash, Java, and Silverlight are cumbersome and slow to load. The interfaces, more often then not, look awkward and out of place in a webpage, and any attempt to customize the client requires the installation of bulky tools to edit files and recompile things. Meaning... eew.

How hard is it?

DecafMUD is the easiest web-based MUD client that I, at least, have come across. You don't need to mess around with convulted tags to make sure every browser knows how to load your object, and you don't need to know how to write fanciful JavaScripts. DecafMUD does all the hard work for you.

Maybe an example would be best... like the following. All you need to create a simple client is to include a script, and add the following code:

new DecafMUD({
	set_interface: {
		container: "#my-element"

That'll create a new MUD client in an element with the ID my-element and attempt to connect to a MUD being hosted at the same host as the webpage, on the default port (that's 4000, for the record). Not good enough though? Want to specify a different host and port, maybe? That's easy too:

new DecafMUD({
	set_interface: {
		container: "#my-element"
	host: "",
	port: 4242

You do have to worry about Flash security policies, if you're using Flash, but we'll get to those later. Also, DecafMUD is in no way associated with Discworld MUD (as far as I know, at least). That was just an example.

What can DecafMUD do?

DecafMUD has an easy to use plugin architecture that allows you to extend it with your own features. For now though, it has the following functionality:

  • ANSI escape codes for color (foreground and background), as well as clearing the screen.
  • XTERM 256 Colors mode as well, again with both foreground and background color support.
  • Multiple output elements are on the way, allowing you to do things like output MUD chat into a seperate pane.
  • Advanced input, with support for multi-line text, as well as browsing the most recently entered commands with the arrow keys and password censorship in combination with telnet's ECHO option.
  • Partial MXP support is on the way. I haven't made it available yet because it's too unstable. And, on that note, MXP is a complete pain to implement.

A pretty impressive feature set, I hope. In addition, DecafMUD has good support for telnet option negotiation. Using plugins it's easy to add support for new options, and the client properly refuses any options that it doesn't recognize. It comes with the following options already working for you:

Pretty impressive for a lightweight MUD client written almost entirely in JavaScript, with only a small Flash file for connectivity (unless you're using WebSockets of course).

How do you get DecafMUD?

You can try an assortment of different demos with the link at the top of the page, or download the latest version if you'd prefer to jump right into things.

Oh, for the record, it's released under the MIT license. Meaning you can do pretty much whatever the heck you want with it. Just don't blame me if something explodes or something.

Go to the top.