[DGD]Object manager released
Felix A. Croes
felix at dworkin.nl
Thu Sep 21 14:09:04 CEST 2000
"Chris Kaczor" <zor at mediaone.net> wrote:
> Yeah - I learn best from examples which is why I latched onto Melville - it
> was already working in a way that I could map to my understanding of 2.4.5
> and work from there.
>
> The kernel lib is so basic I'm just lost on where to start - I have a vague
> understanding of the basics but I'm not sure how to start even after reading
> the documentation.
Try to approach the kernel lib as an operating system rather than
a 2.4.5-like mudlib. The best way to start may be to login as
admin, and trying out all the commands in /kernel/lib/wiztool.c
(other than those, all commands you have are "say", "tell", "users"
and "quit").
There are no rooms or typical other mud-things, but there are admins,
wizards and unprivileged users. The kernel lib is a combination of
a minimal programming environment -- the wiztool is actually quite
powerful -- and a core mudlib that something bigger can be built
on top of. It enforces a difference between inherited objects and
other ("used") objects that is essential for upgrading entire trees
of objects.
> It seems the core of starting is in this paragraph:
>
> When you begin building, start with making a new user object. This object
> should reside in /usr/System/obj and must save user information in /save, if
> it saves at all. The user object must inherit /kernel/lib/user. Next,
> create a telnet connection manager which can be installed using
> "/kernel/sys/userd"->set_telnet_manager(obj). Finally, create
> /usr/System/initd.c which handles system-specific initialization (for
> instance, the telnet connection manager must be installed from the create()
> function).
The overview document is rather out of date (it was created prior to
the first release in 1997). Creating better kernel lib documentation
has a high priority now, I will probably start on it during the next
few weeks.
> The first part about creating a new /usr/System/obj/user.c and inheriting
> user from the kernel lib seems pretty straightforward. After that I'm
> lost...
>
> For example - "create a telnet connection manager" - does that mean I need
> to load one that already exists or write my own? It seems this is what
> "\dgd\mud\kernel\obj\telnet.c" is for?
You must write your own telnet connection manager so you can use
actually use your non-kernel user object. The telnet connection
manager doles out user objects for incoming telnet connections.
> The creation of /usr/System/initd.c seems much like the first part - it
> seems I need to give it a create function and install the telnet manager in
> there - something like the following?
>
> static void create()
> {
> compile_object("/kernel/obj/telnet");
>
>
> "/kernel/sys/userd"->set_telnet_manager(find_object("/kernel/obj/telnet"));
> }
You don't have to compile /kernel/obj/telnet; it is already compiled
by the kernel library :) It also has a purpose already; it is the
connection object for a telnet connection. You should write a new
telnet manager which gives out user objects that, by inheriting
/kernel/lib/user, will communicate with such a telnet object.
> This seems to actually load but I get errors when I try to connect...maybe
> that's not really the telnet manager?
>
> If someone has some small files or code snippets to share that I could learn
> from I would appreciate it. It seems I am on the right track because I can
> insert the error daemon code from Erwin in that create function above and I
> get differently formatted error information when I try to connect - so at
> least something is working - even though it is an error. =)
See /doc/kernel/hook/userd for the specifications of telnet connection
manager.
Regards,
Dworkin
List config page: http://list.imaginary.com/mailman/listinfo/dgd
More information about the DGD
mailing list