View Single Post
Old 05-09-2002, 01:14 PM   #3
Serge
SCUMMLord
 
Join Date: Mar 2002
Location: Denmark
Posts: 196
Question Adventure scripting languages

No, didn't make this a poll, because I want opinions, not statistics.

As some of you are aware by now, one part of the SCUMMBag family (see another thread) is the ScummIDE - a tool to create new games using the original SCUMM engines - or, sometime in the future, scummvm (and WinSPUTM, which is still the least likely to ever be done of all the SCUMMBag programs, though).

Anyway, finished 99% of the grammar for the language this tool is going to use. In other words, currently it's not using SCUMM syntax, but rather something C/Java-like called LECHUCK (this is also the syntax the CMI Decompiler uses by default). However, ran into a couple of problems, the major one being very special commands in SCUMM. As an example:
Code:
blast-text wrap charset 1 color 21 
  center at 320, current-lyric-y "/S9BL360/Door hinge?"
I broke the lines to avoid making them break the board layout... Will do so longer down too.

This is something resembling original SCUMM code for part of a well-known song from CMI. What it does is print the line "Door hinge?" word wrapped, with character set 1, color 21, centered, at the coordinates (320, current-lyric-y). Any of these settings may be left out in original SCUMM (the engine will then use the default), and they may come in any order.

So, something like BlastText("Door hinge?", 320,current_lyric_y,21,1,TRUE,TRUE) won't work. It doesn't allow the freedom I want for creating text like that. So, how to do this in a C/Java-like language? Not sure. However, it's beginning to make me think that maybe a SCUMM-like syntax would be better after all. Either that, or I'll have to invent some new kind of intuitive structure that'll allow things like that in LECHUCK.

But I need your opinions. So, which language would you prefer for scripting an adventure game? LECHUCK or something SCUMM-like? I'll give a short scripting example for each below, also taken from CMI, with Guybrush saying a few lines and turning around a bit:

LECHUCK:
Code:
SleepJiffies(50);
guybrush.SayLine("/CYGT308/Well Murray, are you ready 
  to continue our heady adventuring?");
WaitForMessage;
SleepJiffies(30);
guybrush.SayLine(1,"/CYGT309/Murray?");
WaitForMessage;
do {
  guybrush.Turn(225);
} while WaitForActor(guybrush);
do {
  guybrush.Turn(135);
} while WaitForActor(guybrush);
guybrush.SayLine("/CYGT310/Where'd he go?");
SCUMM:
Code:
  sleep-for 50 jiffies
  say-line guybrush "/CYGT308/Well Murray, are you ready 
    to continue our heady adventuring?"
  wait-for-message
  sleep-for 30 jiffies
  say-line guybrush "/CYGT309/Murray?"
  wait-for-message
  waitingloop1:
    actor guybrush turn 225
  wait-for-actor guybrush waitingloop1
  waitingloop2:
    actor guybrush turn 135
  wait-for-actor guybrush waitingloop2
  say-line guybrush "/CYGT310/Where'd he go?"
Broke lines again, you can't do it that way in the actual language, but again, don't want to break the board layout.

This is not the best example, especially since I haven't decided on how to do waiting for actors in either language. Also, be aware that although original SCUMM allows the character "-" to appear inside a command name, actor name, whatever, the SCUMM derivation for ScummIDE most likely won't, mainly because it gives problems with doing subtraction .

Enough babbling. Please, your opinions

- Serge

Last edited by Serge; 05-09-2002 at 01:24 PM.
Serge is offline   you may: quote & reply,