[MUD-Dev] Extensibility

Ben Chambers bjchamb at bellsouth.net
Tue May 7 06:48:08 New Zealand Standard Time 2002


From: "Ben Chambers" <bjchamb at bellsouth.net>

> Is it possible to use the ability of Java to dynamically load
> classes to make it easier to add new features to your MUD without
> recompiling?  I was thinking that instead of having code snippet
> archives it would be cool if there was some source of expandable
> Java classes.  You know, if you want this new feature, simply
> download this .class file and load it into the server using the
> graphical front end.  Then simply reboot the server (this might
> not be necessary) and without recompiling or anything you have
> updated your server.

> I don't know if this were possible, but if it is I would probably
> attempt to implement it in my MUD which I am about to start
> writing any day now :)

Now that I've been looking at this I have an idea.  What if you
created a hash table of classes that you had loaded from disk.
These would be your built in functions, which the scripting language
could then use to create more complex commands.  For example you
could have a Tell command that uses the interface of a Command and
is inserted into the hashtable under "tell".  Whenever I see the
function "tell" called from a script, it looks to the hash table to
see if it is has one, otherwise it outputs some message telling the
user that that is impossible, as "tell" is an unknown command.
_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev



More information about the MUD-Dev mailing list