[DGD] A simple lib

Noah Gibbs noah_gibbs at yahoo.com
Tue Jan 6 18:28:20 CET 2004


--- Robert Forshaw <iouswuoibev at hotmail.com> wrote:
> After taking a look at the kernel lib it seemed
> sophisticated but also very complicated,

  Heh.  After you've used MudOS, you think DGD with
the Kernel Library is "very complicated"?

  There's general DGD documentation at
"http://phantasmal.sf.net/DGD", but more specifically,
there's a great little tutorial on the Kernel Library
at "http://phantasmal.sf.net/DGD/Kernel".  It's worth
a look if you haven't seen it already.

> with lots of resource management and
> security functionality 
> that I wasn't going to try and understand (I would
> rather implent everything 
> I need from scratch).

  You understand that you'll probably need to read
through it to figure out how to do things, right? 
It's actually a lot of the best documentation for DGD
right now...  At least for how to make a new security
or inheritance policy.  Also, if you don't understand
some of the decisions it makes with respect to, say,
inheritance, you may keep your MUD from ever being
able to take advantage of certain features, like, say,
full rebuild.

> I have been attempting to code a login process
> (which I think I have done 
> successfully) which initiates when attempting to
> connect via the specified 
> telnet port. It compiles and then clones a user
> object and then returns it 
> from telnet_connect(). After that... well, nothing
> happens! I try to connect 
> and it either immediately drops my connection or
> hangs around forever (I 
> think the hanging around forever is how it should
> be).

  Hm.  Chances are good that you have an error or
infinite loop that is preventing you from seeing
output.  Do you have some kind of error handler
registered so that you can see when an error occurs? 
That's yet *another* thing that the Kernel Library
would be doing for you, if only you were using it.

  Ditto for the tick limits that Dworkin mentioned
earlier.  Then you'd have a better idea what was wrong
because you'd see an error when your code had been
running longer than it was allowed.

  But, y'know, if you think understanding the Kernel
Library is just too much work...  *grin*

> The DGD window 
> becomes impossible to close except via the task
> manager. It totally refuses 
> to print any messages to the terminal or the DGD
> window.

  Yeah, the "impossible to close" deal is an old
error, long fixed.  You know that unpatched 1.2 is,
like, several years old now, right?  1.2p3 is a better
choice, and so is a recent experimental version.

> Incidently, is there any way to transfer
> 'interactivity' to a different 
> object and destruct the old one?

  Only by delegating to another object (which the
Kernel Library does, and you'll eventually want to). 
Essentially, that first object *is* DGD's
representation of interactivity, so it's that very
object that you would transfer from one thing to
another if you wanted to transfer interactivity.

  That would argue in favor of making your basic user
object small and simple, then adding all your extra
cruft via call_other() or inheritance.  Again, what
the other DGD MUDLibs tend to do.

>  MUDOS and LDMUD both have this feature, so 
> it would appear that DGD should also?

  I'll note in passing that this is rarely true.  DGD
is its own beast, and it keeps a *very* different
interface than LDMUD or MudOS.  You can do the same
thing from the user or code perspective as almost any
of their tricks, but you'll often have to implement it
differently underneath.  Very often.  DGD doesn't
attempt to maintain full compatibility with either of
their dialects.  Around here we call that a feature
:-)

For patching, you'll need to be able to build DGD.  So
yes, you may need to install Cygwin.



=====
------
noah_gibbs at yahoo.com

__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus
_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list