[MUD-Dev] Re: MUD-Dev digest, Vol 1 #105 - 12 msgs

Dr. Cat cat at oldzoom.bga.com
Thu Jun 17 23:17:15 CEST 1999


Various people wrote:

   [miscellaneous comments about in-game programming languages]

You know...  It seems to me that a lot of the discussion on the list 
about languages sounds similar to what I imagine discussions would sound 
like about designing general-purpose programming languages.  While that's 
educational, and many of the same issues arise in making efficient 
special-purpose languages...  I think one point is being missed, in
that 99.999% of the language design here seems to be aimed solely at
an audience of programmers.

My language is designed for non-programmers.  I call it a scripting 
language, and won't ever use words like "program" or "programming"
in talking about it.  That's because a normal, non-programmer human
will tend to hear those words and translate it in their head to "oh, 
that's something I can't do".  One of my proudest moments was one
Halloween, when a 10 year old girl made a special dream where she
scripted monsters to pop up from behind doors, and, with a couple
of questions answered for her, made a spin-the-bottle game too.

Anyway, the language is far from done, and I lost my specs for the rest 
of it a while back and need to reconstruct them from memory.  It
currently lacks variables, strings, relative coordinates, and a few
other important things I'll add in later.  Nonetheless, I think that
a list of what's in it now might stimulate some worthwhile discussion on 
the list so I'm tossing it forth.  Basically this is meant to be a 
language that is designed primarily from a standpoint of looking at "What 
kinds of things do users most want to do", and implementing a language 
where those things can be done as easily as possible.  This is more 
important than power or being able to do everything that a Turing machine 
can do.  :X)

The language is totally event driven, there's no code sitting around 
running when players are inactive except for the timer-based events.
When a player moves, uses an item, gets or drops an item, etc. then
the interpreter scans the tokenized version of the script to see if that 
particular action should trigger something.  Since the fancy GUI type
editor I hope to make someday isn't done yet, players currently script
stuff by cutting and pasting the following template lines, and replacing 
the # fields with actual numbers.  The tokenizer for the language scans
through for characters in the range from '0' to '9', so these could be
re-written freely, or comments embedded in the source code at will.

Here's all the current bits and pieces...


(0:0) When everything is starting up,
(0:1) Whenever somebody moves,
(0:2) When somebody moves into floor type #,
(0:3) When somebody moves into object type #,
(0:7) When somebody moves into position (#,#),
(0:9) When a furre arrives in the dream,
(0:10) When a furre leaves the dream,
(0:17) When somebody picks up object type #,
(0:18) When somebody drops object type #,
(0:19) When somebody uses object type #,
(0:50) When countdown timer # goes off,
(0:100) When # seconds have passed, offset by #,

(1:2) and they move into floor type #,
(1:3) and they move into object type #,
(1:7) and they move into position (#,#),
(1:17) and they (moved from/are standing at) floor type #,
(1:18) and they (moved from/are standing at) object type #,
(1:19) and they (moved from/are standing at) position (#,#),
(1:102) and they didn't move into floor type #,
(1:103) and they didn't move into object type #,
(1:107) and they didn't move into position (#,#),
(1:117) and they (didn't move from/aren't standing at) floor type #,
(1:118) and they (didn't move from/aren't standing at) object type #,
(1:119) and they (didn't move from/aren't standing at) position (#,#),
(1:1000) and a random dice roll comes up (# percent of the time),
(1:1002) and they are holding item # in their paws,
(1:1004) and they're not holding item # in paws,
(1:1011) and position (#,#) is floor type #,
(1:1012) and position (#,#) is not floor type #,
(1:1013) and position (#,#) is object type #,
(1:1014) and position (#,#) is not object type #,

	(3:1) everywhere on the whole map,
	(3:2) at position (#,#) on the map,
	(3:4) within the rectangle (#,#) - (#,#),
                                   (upper left - lower right)
	(3:5) where the triggering furre (moved from/is standing at),
	(3:6) where the triggering furre moved into,

	(4:0) clear all filtering,
	(4:1) only where the floor is type #,
	(4:2) only where the floor is not type #,
	(4:3) only where an object type # is,
	(4:4) only where there is no object type #,
	(4:7) only where there is an object,
	(4:8) only where there are no objects,
	(4:9) only in places where someone can walk,
	(4:10) only in places that can't be walked into,

	(5:1) set the floor to type #.
	(5:2) change floor type # to type #.
	(5:3) swap floor types # and #.
	(5:4) place object type #.
		(use zero to clear out objects)
	(5:5) change object type # to type #.
	(5:6) swap object types # and #.
	(5:8) play sound # to whoever set off the trigger.
	(5:12) play sound # to everyone on the map.
	(5:14) move the triggering furre to (#,#) if there's nobody 
already there.
	(5:15) move the triggering furre to (#,#), or to someplace nearby 
if it's occupied.
	(5:16) move any furre present to (#,#) if there's nobody already there.
	(5:17) move any furre present to (#,#), or to someplace nearby if 
it's occupied.
	(5:21) move the object to (#,#).
	(5:22) copy the object to (#,#).
	(5:23) swap the object with the object at (#,#).
	(5:24) copy the floor to (#,#).
	(5:25) swap the floor with the floor at (#,#).
	(5:50) set countdown timer # to go off in # seconds.
	(5:100) turn on "classic" mode and update the screen after each trigger.
	(5:101) turn "classic" mode back off.
	(5:1000) redraw the screen and show everything that's just changed.

You'd have a hard time sieving for prime numbers with this language...
But making something fun isn't hard at all.  :X)

*-------------------------------------------**-----------------------------* 
   Dr. Cat / Dragon's Eye Productions       ||       Free alpha test:
*-------------------------------------------**  http://www.bga.com/furcadia
  Furcadia - a new graphic mud for PCs!     ||  Let your imagination soar!
*-------------------------------------------**-----------------------------*



_______________________________________________
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