[MUD-Dev] ScryMUD 1.9.3 released.

Ben Greear greear at cyberhighway.net
Thu May 27 21:00:49 CEST 1999


Chris Gray wrote:
> 
> [Ben Greear:]
> 
> > Grock habla 'foo'
> > and an English speaker to see:
> > Grock says 'foo'
> 
> A friend of mine who sort-of speaks Esperanto helped me translate my
> simple one-source-file scenario into that language. It sort-of works,
> but some of the stuff got tricky. Do you handle input commands in
> other languages?

My parser is very spartan in nature.  It can't handle modifiers like
the, a, from, to, at....  (It does allow for abbreviation everywhere though,
consider it the UNIX of mud parsers :))

I believe with that restriction in place, and my new alias implementation
scheme, other languages will be supported just as well as English.  For once,
I'm glad at how rudimentary the parsing really is :)

 How? Since Amiga stuff was used more in Europe than
> in North America, I got asked for German and Norwegian(?) versions
> of it, but couldn't figure out how to properly handle commands where
> the verb isn't at the start. My parser is pretty keyed on that. I
> put out some questions on how to approach it, but didn't get any
> useful suggestions back.

If you are interested in my parser, check out the parse.cc, along with the
code_gen tool and the gen_cmds.* files (which the code_gen produces).  It's
not all that clever, but with the auto-gen capability, adding new aliases
(ie commands in other languages), seems like it will be quite easy.  I may
have to do work to beat performance issues, as I couldn't figure out how
to get better than linear lookup (strncasecmp) after doing a switch on the
first letter.  However, at some point you just gotta buy bigger hardware if
it's an issue (and so far, it definately isn't a problem).

> 
> Any general thoughts in the group on how to handle input commands
> where the verb isn't always the first word, and where the parser doesn't
> know all of the words used in the command?

I always force the verb to be at the beginning, and only nouns and numbers
follow.  (Thats generally the case at least.)  So, if you built the world
database in a certain language, and added aliases for the language to the
code-gen process, then you should be pretty much good to go.  In your
case, you might have to have drop-in parsers, that are chosen dynamically
at run-time, based on the language-enum of a particular character.

That said, a great deal of work waits to be done pulling out each and every
constant string (and sprintf pattern) and putting in an external place
(translations.spec).  Only then will it be truly multi-lingual.  However,
I think I've beat many of the technical issues...only the boring work
remains!!  (Famous last words!!)

The interesting part will be allowing the sprintf patterns to work w/different
verb/noun order as you mentioned earlier.  I don't have an automagic idea for
that (other than adding a %I tag that tells my Sprintf to ignore that command..)

> 
> --
> Don't design inefficiency in - it'll happen in the implementation.
> 
> Chris Gray     cg at ami-cg.GraySage.Edmonton.AB.CA
>                http://www.GraySage.Edmonton.AB.CA/cg/
> 
> _______________________________________________
> MUD-Dev maillist  -  MUD-Dev at kanga.nu
> http://www.kanga.nu/lists/listinfo/mud-dev

--
Ben Greear (greear at cyberhighway.net)  http://www.primenet.com/~greear 
Author of ScryMUD:  mud.primenet.com 4444        (Released under GPL)
http://www.primenet.com/~greear/ScryMUD/scry.html


_______________________________________________
MUD-Dev maillist  -  MUD-Dev at kanga.nu
http://www.kanga.nu/lists/listinfo/mud-dev




More information about the mud-dev-archive mailing list