lfnetwork.com mark read register faq members calendar

Thread: Adventure scripting languages
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 03-15-2002, 02:02 AM   #1
superqult
 
Join Date: Jul 2002
Location: stockholm, sweden
Posts: 12
yeah

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.


"but i better be quiet now
i'm tired of wasting my breath
carrying on and getting upset"
- Elliott Smith (1969 - 2003)
superqult is offline   you may: quote & reply,
Old 03-15-2002, 02:51 AM   #2
Anym
 
Join Date: Jul 2002
Location: Austria
Posts: 16
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.)


I look just like Bobbin Threadbare.

Last edited by Anym; 07-25-2002 at 04:58 PM.
Anym is offline   you may: quote & reply,
Old 05-09-2002, 12: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 12:24 PM.
Serge is offline   you may: quote & reply,
Old 05-09-2002, 04:58 PM   #4
Vanhal
 
Join Date: May 2002
Location: Bray, Ireland
Posts: 18
I like the look of the scumm better, looks simpler, but that might be because i don't know C++.

Vanhal is offline   you may: quote & reply,
Old 05-09-2002, 05:07 PM   #5
itisme
 
Join Date: Apr 2002
Posts: 23
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.


IWAZERE
itisme is offline   you may: quote & reply,
Old 05-09-2002, 07:07 PM   #6
Serge
SCUMMLord
 
Join Date: Mar 2002
Location: Denmark
Posts: 196
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:

Code:
actor largo name "Largo" costume largo-screaming
or verb:

Code:
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:

Code:
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:

Code:
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
Serge is offline   you may: quote & reply,
Old 05-10-2002, 06:05 PM   #7
itisme
 
Join Date: Apr 2002
Posts: 23
i wanna say, that i do not really care what u use. Whatever is easiest for u will make me happy


IWAZERE
itisme is offline   you may: quote & reply,
Old 05-10-2002, 07:52 PM   #8
bgbennyboy
Festively Plump
 
bgbennyboy's Avatar
 
Status: Super Moderator
Join Date: Feb 2002
Location: England
Posts: 1,984
LFN Staff Member 
Hee, thats why im no use at decisions like these either

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.

bgbennyboy is offline   you may: quote & reply,
Old 05-10-2002, 09:47 PM   #9
Serge
SCUMMLord
 
Join Date: Mar 2002
Location: Denmark
Posts: 196
The curly brackets are in SCUMM too:
Code:
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:
Code:
  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
Serge is offline   you may: quote & reply,
Old 06-05-2002, 11:38 AM   #10
ciacioz
 
Join Date: Jun 2002
Posts: 6
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
ciacioz is offline   you may: quote & reply,
Old 06-05-2002, 01:13 PM   #11
Serge
SCUMMLord
 
Join Date: Mar 2002
Location: Denmark
Posts: 196
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
Serge is offline   you may: quote & reply,
Old 06-07-2002, 11:52 PM   #12
moebius
 
moebius's Avatar
 
Join Date: Mar 2002
Location: Galicia, Spain
Posts: 53
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.


Moebius
Developer of the Lixoo engine
moebius is offline   you may: quote & reply,
Old 06-08-2002, 10:18 PM   #13
Drigo Zoxx
Feel the Force...
 
Drigo Zoxx's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 103
hmmm.... sounds like mixin..mojo )
Drigo Zoxx is offline   you may: quote & reply,
Old 06-10-2002, 09:08 AM   #14
Serge
SCUMMLord
 
Join Date: Mar 2002
Location: Denmark
Posts: 196
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
Serge is offline   you may: quote & reply,
Old 06-10-2002, 11:50 AM   #15
JDiPerla
 
JDiPerla's Avatar
 
Join Date: Jun 2002
Location: Connecticut,USA
Posts: 6
I will add something

I would prefer to have LeChuck.

But Scumm is good too.

Joey
JDiPerla is offline   you may: quote & reply,
Old 06-10-2002, 01:20 PM   #16
Drigo Zoxx
Feel the Force...
 
Drigo Zoxx's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 103
I'd prefer SCUMM instead, for "nostalgia" reasons
Drigo Zoxx is offline   you may: quote & reply,
Old 06-26-2002, 09:37 PM   #17
jannar85
 
jannar85's Avatar
 
Join Date: Dec 2001
Location: Mosjøen, Norway
Posts: 616
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!


Regards,
Atle Ragnar Jarnæs Lerøy | Gamedeveloper

Runestone Entertainment

Stay tuned. Soon Launched.
Roger Foodbelly -.- Official Site
jannar85 is offline   you may: quote & reply,
Old 06-27-2002, 03:04 AM   #18
Drigo Zoxx
Feel the Force...
 
Drigo Zoxx's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 103
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
Drigo Zoxx is offline   you may: quote & reply,
Old 07-08-2002, 03:02 AM   #19
superqult
 
Join Date: Jul 2002
Location: stockholm, sweden
Posts: 12
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


"but i better be quiet now
i'm tired of wasting my breath
carrying on and getting upset"
- Elliott Smith (1969 - 2003)
superqult is offline   you may: quote & reply,
Old 07-24-2002, 06:37 PM   #20
blindbat
 
Join Date: Jul 2002
Posts: 2
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 :-)
blindbat is offline   you may: quote & reply,
Old 07-25-2002, 05:00 PM   #21
Anym
 
Join Date: Jul 2002
Location: Austria
Posts: 16
Now that the date seems to be working normally again, perhaps I should bump this thread back to the top.


I look just like Bobbin Threadbare.
Anym is offline   you may: quote & reply,
Old 07-26-2002, 07:47 AM   #22
Anym
 
Join Date: Jul 2002
Location: Austria
Posts: 16
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.


I look just like Bobbin Threadbare.
Anym is offline   you may: quote & reply,
Old 07-26-2002, 12:58 PM   #23
Serge
SCUMMLord
 
Join Date: Mar 2002
Location: Denmark
Posts: 196
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
Serge is offline   you may: quote & reply,
Old 08-02-2002, 08:58 PM   #24
xplo
 
Join Date: Aug 2002
Posts: 2
Smile

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.
xplo is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > Mixnmojo.com > Community Discussion Forums > SCUMM > Adventure scripting languages

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:22 PM.


LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.