[DGD]Hello world.

John West McKenna john at ucc.gu.uwa.edu.au
Tue Nov 2 02:56:41 CET 1999


Yes folks, Dworkin isn't the only person on the list :-)

I've been reading through a bit of the archives, and get the impression
that the number one favourite project with DGD is writing a new mudlib
from scratch.  Have any of these projects got near a releasable state,
or did you all give up?

MY new mudlib is nowhere near being releasable.  I'm stupidly trying to
do it all myself, in what little spare time I've got, and a few of the
things I'm trying to do are (I suspect) just beyond my programming ability.
But since it's just a fun project for my own entertainment, I don't really
care :-)

The parser is based on ideas pinched from the Inform library.  Any object
that wants to add commands executes a line like

  add_grammar("say", "%text to %multiperson", "say_to", ({ 2, 0 }));
or
  add_grammar("put", "%multioutside in %container", "put", ({ 0, 2 }));

The parser searches through its grammar for lines that match the player's
command, sorts out which objects belong where, and pass them on to the
function (in the order given by the last parameter - to allow the same
function to handle commands that might have the same information given
in different orders).  There's a bunch of different tokens to tell the
parser what sort of objects it should be looking for (if you're putting
objects in a container, don't bother with the ones that are already there).

So far it's mostly working, but it isn't very sophisticated at matching
words to objects.  A Simple Matter Of Coding :-)  It'll eventually be
able to cope with "put the fish in the bowl in the box", and sort out
which of the two possible meanings apply to the current world-state
(you are holding a fish, and there is a bowl in a box, or you are holding
a bowl which contains a fish...)

The other major part I'm working on is the universe model.  I want to get
away from the standard room-based model and towards something based on
landmarks.  Rooms are fine for indoor locations (and will be supported as
a special case of containers), but don't work at all outside.  If I'm
standing on the street outside the pub, why can't I see the crowd of a
hundred people standing 20 metres away?

I've only just started on this module, and while I *think* I know how to
do it, there's going to be a lot of work, and a lot of pitfalls.

John West

List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list