[MUD-Dev] Virtual machine design

Ben Greear greear at cyberhighway.net
Sat Apr 17 05:07:32 CEST 1999

Shane King wrote:
> On Sat, Apr 17, 1999 at 04:08:42AM +0000, Ben Greear did spake thusly:
> > 1)  Common users can't program in any real language, so why implement
> > one
> > in the game.  Surely it would be easier to just write all the code in
> > a 'real' language of your choice and then use readily available
> > compilers
> > to make it into a binary....
> I want common users to be able to code in a real language though. :)

I built a (IMHO) pretty damn neat GUI builder for my game.  Few
want to build (for long enough to finish).  I added scripting because
I thought it was cool...and it added some real functionality.  The
most complex scripts in the game are those I wrote to prototype new

In other words, at least the players I have seen, can barely write
decent english (or any other language) or hold a thought long enough
to write an entire zone.  A few simple scripts have been attempted by
others, but nothing like conditional branches or anything...

Of course, some of this is because my scripting is pretty lame,
but it can be made to work, and it can't get much simpler.

I doubt that anyone will put forth the effort to learn a new language
to write mud code for your server.  If they are the kind of person
that will, then they really want to write the server instead :)

I'll offer an anecedote:  I used to play a Diku (JediMUD).  I got
and learned how to use it's 'programming' language (ie a bunch of
matching and scripting).  I soon had a 300 line bot that was pretty
I thought....  However, that was really the end of gaming for me.  I had
had a taste of the _truth_.  I didn't want to be interpretting someone
else's output, I wanted to be doing the output myself!!  That is the
the grail that led me to code.  I don't think there is anything short of
an OS that could hold my attention, and the possibilities I wanted to
code.  That is why I doubt that anyone would really want to use such
an in-game coding language.  It is either too restrictive, or you've
re-written UNIX.

Please pardon the bitterness :)
> Otherwise, I would agree with you...
> I guess that places an additional contraint on what I want to do -
> there has to be some concept of privelledge levels.

Yep, it's amazing how much code you'll write for the explicit purpose of
breaking functionality that took you months of work!! :)

> > 2)  Common users can script, so I definately see the need for simple
> > scripting.
> Scripting isn't good enough for what I want. I want a system where
> players don't disappear from the world, but instead they can write AI's
> for themselves. Of course, standard AI options need be provided for
> those who don't or can't code.

I wish your target audience existed, but I'm not convinced it does....

> Considering I also want the same option for "mobs", scripting gets both
> too slow and too inflexible.

Be careful here.  It may be more efficient to run a few scripts and have
your normal code be native, than put almost everything in interpreted
Those java folks weren't stupid, and they had extreme ammounts of
and time...and their performance is still shaky at best...

> Yeah, I agree, to an extent. I'm not too worried about being
> increadibly flexible, rather my aim is something more dynamic, which
> I've thought of doing in native code but turns out to be rather clumsy
> and ugly, and just plain unworkable.

I think dynamic is the best argument for interpretted code.  Still,
I wonder how much easier it will be to add your own code at run time,
writing it in c/c++/java/?? and promoting into the [CVS??] load.  Either
way you have security issues that will be hard to beat.


Ben Greear (greear at cyberhighway.net)  http://www.primenet.com/~greear 
Author of ScryMUD:  mud.primenet.com 4444        (Released under GPL)

MUD-Dev maillist  -  MUD-Dev at kanga.nu

More information about the mud-dev-archive mailing list