[DGD] A simple lib
Bart van Leeuwen
bart at wotf.org
Tue Jan 6 19:04:12 CET 2004
On Tue, 6 Jan 2004, Robert Forshaw wrote:
> I originally began coding my mudlib in MudOS, then I realised it lacked
> certain features I wanted and moved to LDMUD. Now I've discovered DGD and
> I've decided to build a mudlib from scratch.
So did I some 6 months ago... efford is still going...
>
> After taking a look at the kernel lib it seemed sophisticated but also very
> complicated, 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). Right now, I'm just trying to write something that
> works, nothing more, nothing less. I am using the windows port of DGD 1.2.
Making something from scratch with the argument that it is gonna do
exactly what you want is what brought me to start a lib from scratch as
well, but it is really a good idea to at least understand the DGD kernel
with regards to how it is designed and implemented and why things are as
they are, even when you are not going to use it.
>
> 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). 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.
...
>
> I've uploaded the relevent code here:
> http://www.rbf.org.uk/basiclib.zip.
> Its not much to look at. I have auto.c, which contains a few custom
> functions (if I want to have what are effectually 'sfuns', is this the right
> place to put them? Reason I ask is, don't they get loaded into every object
> even when they aren't required? I've also had to include them in driver.c,
> so it would appear the auto object isn't loaded 'everywhere'), driver.c,
> where I basically copied all the functions and accompanied text from
> /doc/introduction and added code where I thought it to be necessary.
> Interactive.c I've added some functions to divert input to various
> functions, and user.c. which is the object that telnet_connect() is supposed
> to be cloning, and inherits interactive.c.
driver.c does not inherit auto.c indeed, and a quick look at the design
would show that if it did, you'd end up with an infinite loop of needign
the one to load the other.
If you need somethign shared between the 2, put it in an include so you at
least have 1 copy to maintain.
>
> Incidently, is there any way to transfer 'interactivity' to a different
> object and destruct the old one? Right now the only way I can see to do it
> is to pass messages from the object returned by telnet_connect() to whatever
> object you want, but it still requires the first object to exist and is
> where the messages first go to. MUDOS and LDMUD both have this feature, so
> it would appear that DGD should also?
DGD is not LPMUD, and the differences are beyond just using a slightly
different dialect of LPC.
If you come from LPMud/MudOS or similar, you will find that many things
that are doen by the driver there are done in LPC on a DGD system. Means
more work for you now, but also a lot more flexibility.
Either the DGD kernel or the LPMud for DGD lib will provide you with examples
of how to setup such a thing.
>
> Another missing feature that kept causing errors until I noticed it is the
> absence of // style comments. Or are they supported in a more recent patch?
> I haven't figured out how to patch DGD for windows. Do I have to install
> Cygwin?
Hehe.. I'm still considering adding a patch for that to the driver I am
using..
>
> That's all for now, thanks.
>
> _________________________________________________________________
> It's fast, it's easy and it's free. Get MSN Messenger today!
> http://www.msn.co.uk/messenger
>
> _________________________________________________________________
> List config page: http://list.imaginary.com/mailman/listinfo/dgd
>
_________________________________________________________________
List config page: http://list.imaginary.com/mailman/listinfo/dgd
More information about the DGD
mailing list