Author Topic: Leaked Original SCI Source  (Read 42847 times)

0 Members and 1 Guest are viewing this topic.

Offline OmerMor

Re: Leaked Original SCI Source
« Reply #45 on: November 28, 2015, 01:33:17 PM »
I've uploaded 2 more documents to the wiki:
http://sciwiki.sierrahelp.com/index.php?title=Official_SCI_Documentation

The current list contains the following documents:
  • The Script Programming Language
  • SCI Kernel Documentation
  • Object Oriented Programming in Script
  • Script Classes for Adventure Games
  • SCI Parser Programmer's Reference

Offline Collector

Re: Leaked Original SCI Source
« Reply #46 on: November 28, 2015, 02:27:42 PM »
Thanks.
KQII Remake Pic

Offline lance.ewing

Re: Leaked Original SCI Source
« Reply #47 on: November 28, 2015, 03:06:34 PM »
The Classes document is brilliant! Quite a bit bigger than the others and full of detail.

I spotted another example on page 7 of that document where the message passing doesn't use commas:

Code: [Select]
(list add:
    ((Actor new:)
        posn:100 100
        view:5
        setCycle: EndLoop
        myself:
    )
)

I'm tempted to join all these PDFs together and send it somewhere to get a properly printed and bound hard copy, with a nice glossy cover. I know by now we probably all have these on our phones, and can read them whenever in PDF format, but there's something about having a hard copy to flick through, something like the Oreilly pocket reference size would be great.

Offline Kawa

Re: Leaked Original SCI Source
« Reply #48 on: November 28, 2015, 03:22:46 PM »
I made .txt versions, because that's basically what these PDF files are -- plaintext.

They have formfeed characters. That's a first for me.

Offline OmerMor

Re: Leaked Original SCI Source
« Reply #49 on: November 28, 2015, 03:38:03 PM »
I uploaded 2 more files to the wiki:
  • Run Time System Changes
  • SCI Changes & Updates

And from the SCI Changes document, we can find the explanation to the comma separator mystery:
Quote

11/16/88

-   (Jeff) A relatively major change in the way selectors are handled by the
   compiler and interpreter has been made and will require a change in
   syntax of your source code.  Fortunately, there is a conversion program
   which will do the syntax change for you, though you will need to learn
   a few new habits for writing new code.

   The nature of the change is that there is no longer a distinction between
   the various forms of a selector, i.e. "state:", "state?", and "state"
   are identical in all respects except visually.  The interpreter now deals
   with the message

      (anObject aSelector [args ...])

   in the following way:

      (cond
         (- aSelector is a method of anObject
               The method aSelector is invoked with args.
         )
         (- there are no arguments
               The value of the property aSelector is returned.
         )
         (- else
               The value of the property aSelector is set to the
               value of the first argument.
         )
      )

   This leads to several niceties:

      -   The selector symbol table in sc will now be only a third as large
         as it is currently, so you'll have a bit more space for your compiles.

      -   You can now convert between properties and active values with no
         source code changes outside the class involved.  An 'active value'
         is a value which has some sort of side effect when accessed.  See
         the document "/games/sci/system/doc/active.doc" for a further
         explanation.

      -   System code has been reduced in size by 300 bytes since (for esoteric
         reasons) we now have 128 more byte-length selectors.  Don't be usin'
         that space, though -- a new Avoider is on the way once Pablo gets
         well which will eat it all back up.

   What this requires in terms of syntax is the following:

      -   Multiple messages to the same object in an expression must now
         be delimited by commas, so that the compiler can tell where each
         message ends.  Thus,

            (ego
               view: 5
               posn: 100 200
               setMotion: MoveTo y x self
               init:
            )

         becomes

            (ego
               view: 5,
               posn: 100 200,
               setMotion: MoveTo y x self,
               init:
            )

      -   All 'pseudo-selectors' such as 'at:', 'title:', etc. in Print,
         SetMenu, and other function calls must be preceeded with a '#' to
         let the compiler know that you're just passing a number rather
         than trying to access a property.  Thus,

            (Print "This is a pain." at: 100 100)

         becomes

            (Print "This is a pain." #at: 100 100)

   The good news is that there is a conversion program, cvtsci.exe, which
   will do all this syntax conversion for you.  Usage is

      cvtsci file_spec [file_spec ...]

   You probably just want to 'cvtsci *.sc'.  This program can also be run
   over already converted source, so if you forget to use the new syntax
   while modifying an already converted file, just cvtsci it again.

   Note to the sceptical: the entire source of Leisure Suit Larry II has
   been converted, compiled with the new compiler, and played to completion
   on the new interpreter.  You really shouldn't encounter problems.  If
   you do, I'm sure you'll let me know.

Offline troflip

Re: Leaked Original SCI Source
« Reply #50 on: November 28, 2015, 04:07:50 PM »
Hmm, I don't find their reasons very compelling. It seems they could have satisfied their requirements by just making "foo?" equivalent to "foo:"  (which I am fine with).

But making "foo?" and "foo:" also equivalent to "foo", they introduce the yucky comma requirement, and I don't see the benefit. Unless it has something to do with the space savings they mention, I don't see a reason to make the unadorned token work as a selector.

Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline lance.ewing

Re: Leaked Original SCI Source
« Reply #51 on: November 28, 2015, 04:30:10 PM »
Yeah, I completely agree with that. The language seemed a lot cleaner before this change. Supporting the selector without either a : or ? would make it quite ugly to read. I quite like the visual appearance of the pure keyword message syntax.

Offline Kawa

Re: Leaked Original SCI Source
« Reply #52 on: November 28, 2015, 05:07:58 PM »
So the messager script is conv.sc, hmm?

Edit: omg a tutorial for Tutorial.
« Last Edit: November 28, 2015, 05:17:20 PM by Kawa »

Offline troflip

Re: Leaked Original SCI Source
« Reply #53 on: November 28, 2015, 05:39:21 PM »
So the messager script is conv.sc, hmm?

Looks like it's messager.sc. conv.sc is probably the Conversation class (currently named messageobj.sc in our template game).

Edit: omg a tutorial for Tutorial.

There's a find!
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Kawa

Re: Leaked Original SCI Source
« Reply #54 on: November 28, 2015, 05:51:19 PM »
I know right? I tried it just now. Step two is fucked, but step one works -- that's "select this verb in the icon bar".

Offline Kawa

Re: Leaked Original SCI Source
« Reply #55 on: December 01, 2015, 09:46:29 PM »

Offline Collector

Re: Leaked Original SCI Source
« Reply #56 on: December 02, 2015, 01:22:47 AM »
I have started to Wiki-ize the docs. It should make it easier to navigate and adds it to Wiki's searchable database.

http://sciwiki.sierrahelp.com//index.php?title=The_Script_Programming_Language

I would still want to leave the original PDFs for download.
KQII Remake Pic

Offline troflip

Re: Leaked Original SCI Source
« Reply #57 on: December 02, 2015, 01:46:47 AM »
Cool. I'll have my own documentation with SCI Companion, but the syntax won't be 100% the same, so it's good to have the original somewhere.
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline OmerMor

Re: Leaked Original SCI Source
« Reply #58 on: December 02, 2015, 04:15:06 AM »
Nice work, Kawa & Collector.

Kawa: you should probably use fixed-width font for code snippets. I also don't like Word so much because it's doesn't have a good collaboration story like Google Docs does (the fact that I work for Google is irrelevant ;D). I'll try to import it to Google Docs later and see if it looks good enough.

Collector: I like the wiki of the docs. I also edited it a bit.

Online lskovlun

Re: Leaked Original SCI Source
« Reply #59 on: December 02, 2015, 04:39:29 AM »
Code: [Select]
        myself:

This is obviously not SCI in its final form. SCI in its final form calls this yourself (even KQ4), even though the purpose is the same: To pass the address of the newly created object on to the outer expression (adding it to the list), rather than what the second-to-last message would otherwise return.


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.04 seconds with 22 queries.