Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Adventure scripting languages

Page: 1 of 1
 superqult
03-15-2002, 2:02 AM
#1
correct me if i'm wrong, but i think everyone would gladly learn a new language to tbe able to write games for the scumm-engine.
 Anym
03-15-2002, 2:51 AM
#2
Out of interest, what is blast-text used for? Unlike, Sierra adventures, LEC ones don't have a narrator and I can't remeber anything not being said by an actor. (O.K. , there was this "Deep in the Caribbean..." thingy.)
 Serge
05-09-2002, 12:14 PM
#3
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:

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:

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:

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
 Vanhal
05-09-2002, 4:58 PM
#4
I like the look of the scumm better, looks simpler, but that might be because i don't know C++.
 itisme
05-09-2002, 5:07 PM
#5
I know that i know next to *nothing* about programming, but i always found it easier to control C coding rather than SCUMM.
I just thought u might like the opinion of somebody who does not know anything much.
 Serge
05-09-2002, 7:07 PM
#6
Thanks for your opinions so far :)

My main reasons for prefering SCUMM (right now) are mainly a mix of the nostalgia of using the original language, and the more streamlined way of handling multiple optional any-order arguments for stuff like blast-text. This approach also comes in handy (and is used in original SCUMM syntax) in stuff like say-line, or actor:

actor largo name "Largo" costume largo-screaming

or verb:

verb pickup new name "Pick up" at 520,320

etc. The main problem I have with it right now (other than introducing a new language to people who might already have gone through the trouble of learning, say, 15 other languages for various purposes) is the use of "-" in variable names, actor names, verb names, commands etc. It's simply a matter of "How does the compiler know your intentions?" For example, should it regard this:

blast-text at 50,screen-center-y "Hello"

... as "screen-center-y" or "screen minus center minus y"? It may be obvious to us (if the variable names make sense to us), but it's a troublesome decision for the compiler to make. It CAN be done in various ways. I have no idea how the original SCUMM compilers did it. One way to solve it is to require spaces between a minus and the terms. As in:

x = some-variable1 - some-variable2

... but I really don't like forcing spacing on the programmer like that. Another way that's much more complex (but gives more freedom to the user), I won't get into here. This post has grown long enough. Suffice to say, it's hairy.

- Serge
 itisme
05-10-2002, 6:05 PM
#7
i wanna say, that i do not really care what u use. Whatever is easiest for u will make me happy :)
 bgbennyboy
05-10-2002, 7:52 PM
#8
Hee, thats why im no use at decisions like these either:D

Looking at them both there I can see lots of things that I like about LECHUCK but my inherrent fear of curly brackets means i'll plump for SCUMM here too.
 Serge
05-10-2002, 9:47 PM
#9
The curly brackets are in SCUMM too:

if (current-actor == guybrush) {
sayline guybrush "Hi! I'm the current actor!"
} else {
blast-text at 320,50 "We locked Guybrush inside a box.
He tends to get too much attention!"
}

And the most obvious way to get rid of the minus ambiguity turns the example script into this:

SleepFor 50 Jiffies
SayLine guybrush "/CYGT308/Well Murray, are you ready
to continue our heady adventuring?"
WaitForMessage
SleepFor 30 Jiffies
SayLine guybrush "/CYGT309/Murray?"
WaitForMessage
waitingloop1:
actor guybrush turn 225
WaitForActor guybrush waitingloop1
waitingloop2:
actor guybrush turn 135
WaitForActor guybrush waitingloop2
SayLine guybrush "/CYGT310/Where'd he go?"

i.e., simply disallowing minuses in variable names, command names etc.

- Serge
 ciacioz
06-05-2002, 11:38 AM
#10
A tecnical question: (maybe OT) Once you have defined the syntax of your script language, how do you compile it? How you store it in a file? So how the intertpreter read your compiled script? It's like the C/C++ compiler transform the source file in an exe file?

Ok stop question :)

Greetings

P.S. Sorry form my little english
 Serge
06-05-2002, 1:13 PM
#11
Yeah, pretty much the same as a C/C++ compiler. The compiler turns the script into opcodes used by the virtual machine that is the SCUMM interpreter. The choice of language doesn't change the final output, just the way the output is created by the compiler.

- Serge
 moebius
06-07-2002, 11:52 PM
#12
Well, I think an intermediate solution can be achieved: just pick the best concepts around every language and mix them with some new ingredients.
Make it a procedural language, like C/C++/Java/others and add some SCUMMish semantics. You can try to substitute the "-" symbol for that SCUMM operator by another symbol --like ":" or "::"-- that don't clash with the minus sign and you're on the way.
Hope my opinion will be useful.
 Drigo Zoxx
06-08-2002, 10:18 PM
#13
hmmm.... sounds like mixin..mojo :))
 Serge
06-10-2002, 9:08 AM
#14
Thought of those options, and decided they're no good :) Won't use :: or : both due to other languages' grammars and because it's not really easy to type, as '-' is. And I really don't want to make the language too much a mix of everything else - we have language outthere, that pretty much make sense syntactically and semantically - no use in creating another bastard language (such as Visual Basic). I've already learned in the proximity of 30 languages - human and programming ones (and I'm one of those people who really prefer not spending time at the computer :P), and I personally don't feel like making a huge leap to learn one more :)

Of course, some kind of mix will have to be done, but it'll take time. Guess I have plenty of time to think about it now that it's Summer and SCUMMBag is on hold to allow my real life to exist :)

- Serge
 JDiPerla
06-10-2002, 11:50 AM
#15
I would prefer to have LeChuck.

But Scumm is good too.

Joey
 Drigo Zoxx
06-10-2002, 1:20 PM
#16
I'd prefer SCUMM instead, for "nostalgia" reasons :)
 jannar85
06-26-2002, 9:37 PM
#17
Well, since I'm using AGS I'm used to the c++ language (LeChuck).
But I wouldn't mind learning SCUMM(Bag) in LeChuck language.

It'll just take a while to learn;)

Anyway, if you use the more SCUMM like script....
Can't LEC shut it down, for 'distrubating' SCUMM?

They're doing it for ScummVM atm, but I don't know if LEC will succeed because ScummVM supports Simon1 too! :D
 Drigo Zoxx
06-27-2002, 3:04 AM
#18
that's my point too, lets support as many ag as we can so we could be lied from LEC from Sierra and from many others company
 superqult
07-08-2002, 3:02 AM
#19
i'd really prefer the scumm language. and i also like the idea of not allowing dashes in variable names. that sounds like an easy way to solve te problem. and no one will miss them anyway :)
 blindbat
07-24-2002, 6:37 PM
#20
I'd prefer SCUMM, from my experience. (which obviously isn't C or Java :-)

In IF there are 2 main languages: TADS, with a more C-like syntax, and Inform (for the Z-machine VM that runs Infocom adventures) with a syntax created from the outset for the specific purpose of compiling to the Z-machine.

I find that for a very specific task (like this one), sometimes having a non-standard syntax allows for tighter, clearer code, and I found it easier to read Inform than TADS, for instance.

Also since SCUMM has been around for so long, it probably has more kinks worked out than a new language which hasn't yet been through many trials to dig up structural or syntactic problems (see the bit about how to deal with '-')

BUT, of course, if it could lead to problems with LEC, and subsequently the shutdown of this project, I don't mind learning ANY other language/syntax :-)
 Anym
07-25-2002, 5:00 PM
#21
Now that the date seems to be working normally again, perhaps I should bump this thread back to the top.
 Anym
07-26-2002, 7:47 AM
#22
Thanks for the information and the examples! :)

If you want any-order arguments, perhaps it would be possible to add (optional) passing of arguments as name=value pairs. But I don't know how hard that would be to implement nor whether this would help or only unnecessarily complicate things. :confused:
 Serge
07-26-2002, 12:58 PM
#23
Since I only have CMI decompiled with the correct command names, I'll only be able to give examples from that one, really. The entire Pirate Song (at least the barber shop trio singing) is done with blast-text (to position the text so it reads OK (also when lines are sung at the same time), which it wouldn't if it was placed relative to the characters' position. Also, as far as I recall (it's been a long time since I looked at the decompiled scripts), blast-text is also used for the talking interface (you know, the sentence list), probably for the sentence-building interface (inhale helium balloons etc.)

In MI1 we have occasions such as "Meanwhile Beneath Monkey Island LeChuck's pirate ship blah blah blah". "Later"... "Even later"... "Much later" when Guybrush is digging for the Melee Island treasure, etc. Probably also the credits sequence (same goes for most of the other games' credit sequences - including the end credits of CMI).

I could go on. I think. But I won't. Because I don't remember more examples at the moment :)

- Serge
 xplo
08-02-2002, 8:58 PM
#24
Personally I'd prefer the C/Java-like syntax from LECHUCK as it'd save me from learning yet another language from scratch. I'd use the SCUMM syntax anyways if I really had to, but it seems a tad messy to me.
Just my 20 cents :) Looking really forward to the Scummbag tools.
Page: 1 of 1