[DGD] Game interface question (brainstorming)
Noah Gibbs
noah_gibbs at yahoo.com
Sat Nov 29 21:47:56 CET 2003
I've asked this question on the Phantasmal Forums on
SourceForge, but I think it's of broader interest so
I'm going to ask it here also. There's a long-winded
explanation of why I'm curious. If you're feeling
helpful but don't want to read this much, skip to the
bottom and read the last couple of paragraphs.
The upcoming 0.015 release of Phantasmal has had
some major restructuring. Those of you who follow
Phantasmal closely will have already seen the new and
extensive API documentation, and the crude beginnings
of "how to set up a Phantasmal-based MUD" that got put
up also. Most configuration files have moved out of
the /data directory, and more will be doing so shortly
until there are none left. Everything is going to be
under one /usr/foo/ directory or another. I consider
that a good thing.
Specifically it will soon be possible to set up a
Phantasmal-based game without modifying anything in
/usr/common or /usr/System. You just add a bunch of
files under /usr/game to set up your specific game.
This is a lot like how the Kernel Library works -- the
Kernel Library gets its privileged operations from the
DGD driver, puts its internal files into /kernel, and
delegates privilege to files in /usr/System.
Phantasmal gets its privileged operations from the
Kernel Library (through /usr/System), keeps its
internal files in /usr/common, and delegates privilege
to files in /usr/game. So far, so good.
For daemons and objects, it's mostly pretty easy --
certain operations are considered fully safe, and
anybody can call them. Many operations are internal,
and only Phantasmal stuff (in /usr/common or
/usr/System) can call them. But most operations,
especially exported, documented operations, can be
called only by a file under /usr/game. That's what
I've been doing all this API documentation for --
stuff that can be called by anybody, and stuff that
can be called only by /usr/game.
Okay, so... What's my question? I know that stuff
in /usr/game should get full control over the user's
console and what he sees. It should be able to fully
override commands, parsing, etc. That just makes
sense. But what should the interface be like?
My two favorite choices are: use a very restricted
API, or just let /usr/game declare its own version of
the user object that inherits from the Phantasmal one,
just like the Kernel Library does it. The restricted
API would instead have the game stick "user states"
into Phantasmal's user object, which is kind of like
Melville's "input_to" function except that the input
goes to an external object in /usr/game instead.
Thoughts? Preferences?
=====
------
noah_gibbs at yahoo.com
__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree
_________________________________________________________________
List config page: http://list.imaginary.com/mailman/listinfo/dgd
More information about the DGD
mailing list