[MUD-Dev] Properties of computer languages

Adam Wiggins adam at angel.com
Fri Jun 18 12:21:59 CEST 1999


On Fri, 18 Jun 1999 David95037 at aol.com wrote:
> If you want inefficient, definitely do not tokenize the macros, re-parse
> the text each time.  Maybe keep them in a giant string.  When a loop is
> being executed, to find that start of the loop, search the string from the
> beginning.

You jest, but this is exactly the way that the Revenant scripting engine
works.  (I coded most of it in a single week, so I didn't have a lot of
time for fancyness.)

Actually, everything is line-oriented (which saves you from using ;'s,
and it also makes it easier to scan backwards to loop starts and things,
because I can save line numbers to make it easier).

Funny enough, someone wrote a document about how to use it not too long
ago.  It appears to be accurate (and I guess they haven't changed much
since I left):

http://revenantqs.telefragged.com/scripting/GameScript.html

The only thing special about it, I think, is the way that triggers and
priorities work.  In that respect it's not structured much like a "normal"
programming language, because it's event-based, and those events are
interruptable by other, higher-priority events.

Also, some of the commands have a slightly funny syntax, reflecting
the fact that you can type them at the console the same way you would
use them in a script.  Here's a shot of the editor window:

http://www.cinematix.com/images/editor.jpg


Adam W.





_______________________________________________
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