Just a bit of musing
Chris Gray
cg at ami-cg.GraySage.Edmonton.AB.CA
Tue Mar 4 07:23:17 CET 1997
:I posit that, in general, command interpreters for muds are Bad Things. The
:proposal runs sorta like this:
: The command interface to a mud can be viewed as a context free grammar. A
:such, one should be able to whip up a command interpreter with lex/yacc.
:I've started on it at least a dozen times but never managed to quite
:finish. Is this worthwhile? Thoughts?
I think you'll get a more rigid parser than you want for a MUD. You'll
also get one that you can't add verbs to while the MUD is running. If you
do it the classical lex/yacc way, you won't even be able to add words to
the language!
:The proxy and daemon communicate through shared memory or semaphores or
:some such. Advantages:
:the proxy <-> daemon link conform to a single interface scheme
:the proxy <-> user link can conform to several protocols... say one for
: text-based users, another for binary messages etc.
:if the user has link troubles, or is idle or whatever, it's the proxy that
:hangs.
:the proxy-daemon comm method is thru semaphores/shared memory. daemon
:writes updates to a shared segment that is read-only to all proxies. daemon
:reads new info from one segment per proxy. If the proxy has trouble and the
:segment isn't updated, the daemon skips it. Look ma... user A's troubles
:don't cascade and screw user B. Thoughts?
That's what I've got. I use AmigaOS Exec messages between the proxies and
the central server. In the Amiga's single address space, that's lots fast.
I currently have three different proxy programs: MUDAgent (talks serial
port reliable protocol), MUDBinary (supports my custom client over a
TCP link), and MUDText (supports a dumb telnet text-only connection).
The reason I did this is a bit different, however. My in-MUD interpreted
language has a recursive descent parser in a shared library. It needs to
maintain its own state in a parse (input can be huge!). So, I needed a
separate process for each client running something other than my custom
MUD client (which does the parsing local).
--
Chris Gray cg at ami-cg.GraySage.Edmonton.AB.CA
More information about the mud-dev-archive
mailing list