Author Topic: Al Lowe reveals his Sierra source code collection葉hen puts all of it on eBay  (Read 5853 times)

0 Members and 2 Guests are viewing this topic.

Offline lance.ewing

If memory serves me right, the AGI code shown in the Donald B. Trivette book might have shown comments like that.

Offline Charles

Good memory.

Offline OmerMor


Offline AGKorson

Having said that, i think this is really unfortunate news, and means we may never get to see the original sources to Larry or Sierra's other titles.

Hi Peter,
Don't despair. Here's the source for LSL1's Lefty's bar (RM15):

RM15.CG
Code: [Select]
snip

RM15.MSG
Code: [Select]
snip

Where did you get this? It is a really fascinating look at how Sierra coded their games. Some things that I noticed right away:

 - commands are not in the 'dot' format; looks like they used CamelCase. Which is interesting because the debug scripts all used lower case, with a dot separator.
 - looks like they set aside flags and variables from 200 and above as 'local' flags and variables; for example, 'nearJukeBox', defined as 'lf3', decompiles as f203
 - reserved flags and variables have values different than what is currently used in fan based games (for example currentRoom vs room_num, haveInput vs input_received)
 - in 'said' commands, they didn't use quotes around words; and they used dollar sign ($) for spaces

I would really love to have more of this source code to help in decompiling the interpreter and gaining a fuller understanding of how everything works.

Offline troflip

Apparently a scan of the book can be found in the Internet Archive:
https://www.archive.org/35/items/the-official-book-of-kings-quest/TheOfficialBookOfKingsQuest_text.pdf#page=31

Pretty easy to pick one up off of ebay too.
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline OmerMor

Where did you get this? It is a really fascinating look at how Sierra coded their games.
From generous people who were willing to privately share it with me.

I would really love to have more of this source code to help in decompiling the interpreter and gaining a fuller understanding of how everything works.

If you're looking for a specific snippet - I can probably post it here.

Offline lance.ewing

Some things that I noticed right away:

 - commands are not in the 'dot' format; looks like they used CamelCase. Which is interesting because the debug scripts all used lower case, with a dot separator.
 - looks like they set aside flags and variables from 200 and above as 'local' flags and variables; for example, 'nearJukeBox', defined as 'lf3', decompiles as f203
 - reserved flags and variables have values different than what is currently used in fan based games (for example currentRoom vs room_num, haveInput vs input_received)
 - in 'said' commands, they didn't use quotes around words; and they used dollar sign ($) for space

Perhaps if Omer has scripts from other AGI games, he could post one or two more for comparison with LSL.

Offline pmkelly

Really great to see you join the forum. Hope we see a few more posts from you. It's been a long time. Any thoughts on doing anything in the AGI community again?

I feel somewhat tempted to do a rewrite of AGI Studio in TypeScript that would allow it to run on all platforms via Electron, and also via a web browser. Currently my full time gig is working on interpreters/compilers + web-based IDEs so it seems like a good time to revisit AGI tooling again. Largely it's going to be a matter of whether I could find enough spare time to do it, but also what level of interest there might be in such a project.

Anyone think this is a good idea? I'd love to see more fan games being made and existence of more modern tools esp. with good support for Mac/Linux as well as Windows might help that.

If I were to go ahead with this I'd use https://github.com/Microsoft/monaco-editor which provides excellent facilities for language tooling like error highlighting, autocomplete etc.

Offline pmkelly

Hi Peter,
Don't despair. Here's the source for LSL1's Lefty's bar (RM15):

!!!!!!!!

Wow. That... is awesome.

I never thought I'd get to see any of the original code. My main interest is in the syntax and structure; the language AGI Studio uses is an educated guess partially based on some code samples that came from a book somewhere (it might have actually been the one Charles posted about). I always wondered what it _really_ looked like, e.g. how variable names were handled, whether there were local declarations used for specific rooms or everything was global, whether messages were embedded or in a separate file etc.

If I were to go ahead with a new version of AGI Studio, I'd love to have it support the original syntax, for authenticity. I understand there's legal restrictions on the original sources for the games, but I'm sure we could put together a brand new template and/or examples which conformed to the original syntax without problems as that would constitute our own work.
« Last Edit: December 26, 2018, 11:20:44 AM by pmkelly »

Offline lance.ewing

I never thought I'd get to see any of the original code. My main interest is in the syntax and structure; the language AGI Studio uses is an educated guess partially based on some code samples that came from a book somewhere (it might have actually been the one Charles posted about).

Yes, it was definitely the same book. I bought a copy of this book back in the 90s, from a local store in NZ, and that is what I used when I created the SHOWLOG application, which I think is what you used as the basis of the code syntax in AGI Studio. So indirectly the AGI Studio syntax is based on the example code in the Donald B. Trivette book. I would expect it to be fairly authentic, given it was in that book, which is why I'm surprised a bit that the LSL1 source code is different.

I always wondered what it _really_ looked like, e.g. how variable names were handled, whether there were local declarations used for specific rooms or everything was global, whether messages were embedded or in a separate file etc.

I'm hoping Omer is going to provide some samples from other games for comparison (the more games, the better, even if it is only one script from each  ;) ). It could be that they had multiple different syntaxes, which if true would make it difficult to make a tool like AGI Studio or WinAGI more authentic.

If I were to go ahead with a new version of AGI Studio, I'd love to have it support the original syntax, for authenticity. I understand there's legal restrictions on the original sources for the games, but I'm sure we could put together a brand new template and/or examples which conformed to the original syntax without problems as that would constitute our own work.

Don't know if you know, but there is something like 75% of the original AGI interpreter source code available as well. There is a topic on these forums with an attachment that has the code. Apparently it was found in the floppy disk slack space from one of the games. It has been invaluable in my work on the C# AGI Interpreter.

Offline OmerMor

I'm hoping Omer is going to provide some samples from other games for comparison (the more games, the better, even if it is only one script from each  ;) ). It could be that they had multiple different syntaxes, which if true would make it difficult to make a tool like AGI Studio or WinAGI more authentic.

Here are some samples from a few AGI games: https://drive.google.com/open?id=1HSI3RiZPYszjLPbZM9k-Zyuo4uHqd1id
The syntax is game specific and defined in their source.

Offline lance.ewing

I feel somewhat tempted to do a rewrite of AGI Studio in TypeScript that would allow it to run on all platforms via Electron, and also via a web browser. Currently my full time gig is working on interpreters/compilers + web-based IDEs so it seems like a good time to revisit AGI tooling again. Largely it's going to be a matter of whether I could find enough spare time to do it, but also what level of interest there might be in such a project.

Anyone think this is a good idea? I'd love to see more fan games being made and existence of more modern tools esp. with good support for Mac/Linux as well as Windows might help that.

If I were to go ahead with this I'd use https://github.com/Microsoft/monaco-editor which provides excellent facilities for language tooling like error highlighting, autocomplete etc.

I would certainly be interested in such a project. I was considering something similar. My thoughts were about creating something like the Scratch online programming "IDE" that is used a lot in school these days. I've played around with Scratch a bit (my daughters have both used it in school, and my younger daughter likes building Adventure-like games in Scratch on her ipad). It struct me that such an online environment would be great for an AGI IDE. If we could define a similar palette of blocks that could be dragged and dropped to build scripts, similar to how Scratch does it, then I think that might go down well, not only with AGI fans, but also in schools. And that is where I think it gets interesting. If the AGI/SCI community were to build something similar to Scratch but for building AGI games, then it could very well become adopted by some schools and our exposure could be greatly increased.

So if your plans were to create something online like that, then I think it would be fantastic. I've seen "block" like programming demos (Google's Blockly) where you can switch between the code and the blocks, where changes in one reflect in the other. That might be quite interesting as well.

Offline lance.ewing

Here are some samples from a few AGI games: https://drive.google.com/open?id=1HSI3RiZPYszjLPbZM9k-Zyuo4uHqd1id
The syntax is game specific and defined in their source.

Thanks Omer. Yeah, looks like coders defined what they liked, although LSL appears to be the odd one out.

I've just remembered that you also provided a PDF with the original AGI programming documentation used by Sierra, and that it is attached to a post somewhere here in the forums. That document would also answer the question about syntax. Peter would no doubt be interested in that as well. Let me see if I can find the post...

Found it:  http://sciprogramming.com/community/index.php?topic=1617.0

Offline AGKorson

Here are some samples from a few AGI games: https://drive.google.com/open?id=1HSI3RiZPYszjLPbZM9k-Zyuo4uHqd1id
The syntax is game specific and defined in their source.

Thank you for this! I'll probably spend weeks going over these samples in detail! I'm pleased that at first glance, all of the things I learned about variables, flags, commands, etc. by decompiling the interpreters appears to be accurate based on what I see here. And I also noticed that they used defines to refer to their resources (rooms, logics, views, sound, pics) which is emulated in WinAGI by the ResourceID property.



Offline Collector

I would hate to see Visual AGI get swept under the rug with all of these other projects.
KQII Remake Pic


SMF 2.0.14 | SMF © 2017, Simple Machines
Simple Audio Video Embedder

Page created in 0.133 seconds with 24 queries.