This is a fourth version MUD framework in Perl based on:
and an example MySql database, filled with random example records. This version changes the definitions of the messages
table in the database...
The JSON is used to store properties, for example what type of thing it was before it was toaded,
since this is pretty extensible, I'm hoping to freeze the database stucture.
It's inspired by PerlMUD 3.0 but nothing much like it, except the verbs. Since it uses RecDescent,
the idea is to expand the command structure in unusual ways. Also the table and template structure
is designed for multilingual use.
Examples of verbs: create, pcreate [player create], take, drop, run, bag, look, toad and plant tree,shoot,flower etc.
This mid-March version now contains a little parsing logic for some French commandsL je vais au sud, poser, etc. look in the
parser and also a draft messages file and template for french. Doesn't really work properly, but it's a start and proof of
concept for multlingual. In fact it should accept French and English at the same time because it's all in one parser.
It now uses Raphael.js to draw an SVG based game-map and Jquery Ajax to update the database and map.
In fact, this is 'really' a platform to make experiments with this mixture of technologies.
A very rough Ajax style IM is in this version. Traditionally MUDs have 'say', 'tell' so why should this be different?
Also, this is easy but messy to do, get_parser could easily be modified to return a new 'language' but the same set of actions,
joueur regarder, va, laisser tomber, prendre etc...therefore I'll probably put a language property in the json soon...
To set it up:
1. Set up a database using the Sql in the sql subdirectory, use the sample or the empty one
2. Alter the database name, user and password in mud.cf.sample and move to mud.cf
3. Make sure all the modules above are accessible
4. Modify use lib statement in hughmud.cgi, if necessary
5. Modify the template path in MUD/Actions.pm, if necessary:
our $pages = new HTML::SimpleTemplate("../templates/en");
6. Make sure hughmud.cgi is world execute, of course...
7. Surf to http://yourdomain.com/cgi-bin/hughmud.cgi
Don't expect anything very much from this at the moment, it's version minus, minus one.
I'm probably going to put an eco-style theme into the commands, but RecDescent will, of course,
allow all kinds of things.
The best way to learn any new commands is to look into Parser.pm that parses everything except the
empty command, parsed by say_something().
If you're interested in my more 'serious' work as well: https://sourceforge.net/projects/cclite/ is software
for Local Exchange Trading Systems [LETS] or SEL en francais...
Share and enjoy! Hugh Barnard, East London E14 February 2011