Since returning from the WikiMania2005 conference I have this idea of enabling the Moin wiki to act as a simple Multi User Dungeon.

I never did any MUD-programming myself, so I don't know how hard it is or how easily accessible the datastructure is. So this thing can be considered merely experimenting.

Please feel free to contact me, if you're interested in contributing your ideas.

Current state

Currently there is a Parser, called "SUD" (sud.py). For installation just copy it to your plugin/parsers directory.

Using SUD works like this:

Example

Page: FabianHouse

 #pragma zone FabianHouse
 {{{#!sud
   # Nothing here
 }} }
 You are standing in front of a beautiful house.
 A ["/Door"] leads into it and a ["/Doormat"] welcomes you with the words "No door-to-door selling!".

Page: FabianHouse/Door

 #pragma zone FabianHouse
 {{{#!sud
 if status == "opendoor":
    redirect("Inside")
 elif inventory.has_key("doorkey"):
    inventory.del_item("doorkey")
    status = "opendoor"
    redirect("Inside", u"The key fits - you open the door.")
 else:
    redirect("../FabianHouse", u"The door is locked.")
 }} }

Page: FabianHouse/Doormat

 #pragma zone FabianHouse
 {{{#!sud
 if inventory.has_key("doorkey") or status == "opendoor":
    msg = u"It's just a doormat."
 else:
    inventory.set_item("doorkey", "on")
    msg = u"There is a key under the mat!"
 redirect("../FabianHouse", msg)
 }} }

Future plans

That part is very basic, as you can see. Anyway, it should give you the idea.

Currently I want to (learn and) use AJAX to make things funky.

AJAX descriptions

AJAX is very simple, it's just a HTTP-request via javascript.

When clicking on "look" and the on any word in the text, which is inside a span tag with an onclick-event, the client javascript will request e.g. the ?action=mud of the same page and request the description for that word. The response will be set into a message-field on top of the page

Please

add your ideas, opinions and suggestions here.

I ever said that Linux (and Python) is a text adventure, but this gives it another dimension. :) -- ThomasWaldmann 2005-11-13 16:04:06

MoinMoin: FabianKreutz/MUD (last edited 2007-10-29 19:06:49 by localhost)