Author Topic: SCI Companion documentation  (Read 36530 times)

0 Members and 1 Guest are viewing this topic.

Offline troflip

SCI Companion documentation
« on: November 06, 2015, 09:46:38 PM »
I've spent several days compiling documentation for the SCI 1.1 template game, and I've just finished a first pass at it.

There are a number of classes that weren't immediately obvious what they do. They are:

- Smopper
- PriorityTalker
- VelocityMover
- AnimDialog
- Inset: what does this do? Used in lb2 and sq5). Involved with Rm::setInset
- Tutorial. Waits for player to do a verb on a noun, then displays message. But how exactly is it used?
- RegionPath ... KQ6 RgBasement is an example usage. Seems related to Path.

If anyone wants to quickly look into these, or knows more about them, that would be great to report your findings here! If not, I'll dig into them a little deeper in the next few days.


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

Offline Kawa

Re: SCI Companion documentation
« Reply #1 on: November 07, 2015, 07:43:35 AM »
Will do, Captain!

Inset
I've already done some research into Inset, since I figured it'd be good for one of the shots in my game. Unfortunately it didn't work out without crashing at the end so I considered that the main screen was simple enough and just made the inset a different room. Now, what are insets? They can be full-screen images like the babe closeups in Larry 6, or they can be smaller views like the little chest on the beach in King's Quest 6. They allow you to show a separate scene as a "child" of sorts of the room, with its own cast, while leaving the original on pause in the background. If you were to look closely at the beach chest in KQ6, you'd find Alexander's knee is still visible behind the chest image.

I find the beach chest to be one of the simplest examples to study that I know of. It's in rm200 if you want it. (Note: global2 = gRoom)

AnimDialog
A bit of a file misnomer I think, since the important bit is the ChoiceTalker class in that same file. It's used for the dialogue trees in SQ5. I've tried studying it before but it was quite the maze. I personally find QFG3's Teller more interesting.

Tutorial
None of the games I have decompiles for seem to actually use this. A global search returns the same set of results for each game save the GK1 Demo, EcoQuest 2, and Hoyle's Classic Cards. And that last one is a false positive to boot! The rest (LB2, KQ6 (CD only), LSL6, SQ5, SQ6) are all the same results with maybe a temporary local set to gGame:script instead of gGame:script directly. They never seem to actually do anything with this functionality, leaving me with no examples to work from. Reminder: I have more SCI1/11 games than those I just listed, and decompiles for all.

RegionPath
Seems to be related to actors that follow a path through several rooms. I'm currently looking at the tram in LSL6, will update. The torpedo rays in Codename Iceman were easier to work with. What I've found so far is that RegionPath instances must provide their own (method (at param1)) that returns a particular value. Mostly, these are picked from a local array:
Code: [Select]
//Example from Codename ICEMAN, scubaRg.sc
(local
rayPath1Ats[13] = (
32767 //Start of a path node
57 //Room 57, westDeadEndRm
249 110 //Starting coordinates
340 110 //Exit stage right
32767
56 //Room 56, caveEntranceRm
-20 133 //Enter stage left
150 150
-32768 //End the path
)
)

(instance rayPath1 of RegionPath
(properties
endType 0
theRegion 305
)
(method (at param1)
return rayPath1Ats[param1]
)
)
The various endType values would probably be best figured out by experimentation.
But wait, there's smores! A given room entry needs not have only two coordinates -- some of these rays have three!
« Last Edit: November 07, 2015, 11:09:59 AM by Kawa »

Offline Kawa

Re: SCI Companion documentation
« Reply #2 on: November 07, 2015, 03:13:52 PM »
Splitting off into a second post for no good reason...

Smopper
What the hell does that word even mean? Fun fact, the only games I have decompiles for that contain and use Smopper are EcoQuest 1 and Space Quest 5, plus my own not anymore it doesn't haha. And SQ5 doesn't even use it directly, but through a subclass FiddleStopWalker. Simple fact is, as I've demonstrated before, that if you have your view with eight walk loops and a standing loop, a smopper will let you actually use that last loop. All these other games I've looked at? They use StopWalk, which to me makes so much more sense. So the choice is yours; do you put setCycle(Smopper -1) or setCycle(StopWalk -1) in your SetUpEgo? They're basically functionally identical, just go about it differently.

If you'd rather have your standing frames in a different view, just pass that view's number instead of -1.

PriorityTalker
Seems to be unique to SQ5, at least as far as my collection shows. Basically just a Talker with ever so slightly-different DrawCel calls, in that it respects priority. Hence the name.
Code: [Select]
//Talker::show
DrawCel((send bust:view) (send bust:loop) (send bust:cel) + (send bust:nsLeft) nsLeft + (send bust:nsTop) nsTop -1)

//PriorityTalker::show
DrawCel((send bust:view) (send bust:loop) (send bust:cel) + (send bust:nsLeft) nsLeft + (send bust:nsTop) nsTop priority)
« Last Edit: November 07, 2015, 05:12:00 PM by Kawa »

Offline troflip

Re: SCI Companion documentation
« Reply #3 on: November 07, 2015, 05:35:42 PM »
Splitting off into a second post for no good reason...

Smopper
What the hell does that word even mean?

I'm guessing it means "Smooth Stopper". It actually looks like it has quite a bit more functionality than StopWalk - in particular, it supports different views for slowing down and starting, in addition to "in motion" and stopped. FiddleStopWalker seems to be sq5-specific, since it contains references to starting and stop views, and also knows whether roger is wearing a red uniform or a blue uniform. By that measure, it should probably be removed from the template game, or at least modified and commented such that that is obvious. I assume it would be useful, but generating all those views is a lot of work, and most people wouldn't do it.

Keeping StopWalk is probably useful though (even though the template game doesn't use it... maybe it should).
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Kawa

Re: SCI Companion documentation
« Reply #4 on: November 07, 2015, 05:52:00 PM »
Keeping StopWalk is probably useful though (even though the template game doesn't use it... maybe it should).
Template Guy is all set up for Smopper/StopWalk, and of like 50 games I have only two use Smopper, so why not?

I think the more interesting, easier to set up, and altogether more often-used fiddler would be the separately-animated head that looks around a bit when you stand in place long enough.

Offline troflip

Re: SCI Companion documentation
« Reply #5 on: November 07, 2015, 05:54:16 PM »
Your Template Guy is set up to use StopWalk, but not the more complex features of Smopper - there aren't any starting and stopping views.
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Kawa

Re: SCI Companion documentation
« Reply #6 on: November 07, 2015, 05:58:59 PM »
Your Template Guy is set up to use StopWalk, but not the more complex features of Smopper - there aren't any starting and stopping views.
Exactly my point.

Offline troflip

Re: SCI Companion documentation
« Reply #7 on: November 07, 2015, 09:43:08 PM »
Looks like VelocityMover is related to Roger being a fly, so it can probably be removed. Doesn't seem very general purpose.
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Kawa

Re: SCI Companion documentation
« Reply #8 on: November 07, 2015, 10:17:27 PM »
And that's all of the items on the list.

Relatedly, I added a resetCycle() method to my ego as a clearer shorthand for setCycle(StopWalk -1). Great for ending incidental animations, and if I ever want to replace it it's just the one line. Could be nice in general?

Offline troflip

Re: SCI Companion documentation
« Reply #9 on: November 08, 2015, 12:21:56 AM »
Could be nice, yeah.

I think I'll leave Tutorial in, since it is actually referenced by some of icon classes (still can't figure out how to use it though).

It would be nice to clean things up by removing a bunch of the rarely used classes from the template game, and have them available as "add ons". But their script numbers need to be listed in DisposeCode to be disposed of properly, so that's not so trivial.
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Kawa

Re: SCI Companion documentation
« Reply #10 on: November 08, 2015, 08:00:04 AM »
I think I'll leave Tutorial in, since it is actually referenced by some of icon classes (still can't figure out how to use it though).
Or you compare the icon classes of SQ5 to those in one of the many other games to safely remove it. I think I will do that myself.

Edit: never mind that's fuckin' asm I'm outta here.
« Last Edit: November 08, 2015, 08:10:28 AM by Kawa »

Offline OmerMor

Re: SCI Companion documentation
« Reply #11 on: November 08, 2015, 12:06:15 PM »
Hey Kawa,
if you know git (and I guess you do), why won't you collaborate on cleaning up the template game w/troflip?

The files are here: https://github.com/icefallgames/SCICompanion/tree/master/SCICompanion/Files/TemplateGame/SCI1.1/src.
You can just send him pull requests with your edits.

Just sayin' ...  :)

Offline Kawa

Re: SCI Companion documentation
« Reply #12 on: November 08, 2015, 12:52:07 PM »
Git and I don't get along, sorry.

And here's OmerMor making flattering presumptions about me again~

Offline troflip

Re: SCI Companion documentation
« Reply #13 on: November 08, 2015, 02:01:29 PM »
I just checked in a big update to the template game. I'm using reStructuredText for documentation, so now the function/class comments in code are in that format, and I have functionality that pulls them out of code and creates the appropriate documentation.
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline troflip

Re: SCI Companion documentation
« Reply #14 on: November 08, 2015, 02:27:02 PM »
The following seem like scripts that could be optional "add ons"

- ChoiceTalker
- Smooper
- Inset
- SmoothLooper
- RegionPath
- Door
- FlickerCycler
- Flags
- Flip   
- PriorityTalker
- PAvoider
- PChase   
- PFollow
- ROsc
- MCyc
- FeatureEditor
- DialogEditor
- PolygonEdit
- Blk   
- Approach
- Track
- DPath
- RelDPath
- DCIcon
- Wander
- Follow
- Chase
- Tutorial
- RegionPath
- Orbit
- Gauge

That would bring the number of scripts in the game by default from 87 to 56, which seems a bit more manageable.
Check out my website: http://icefallgames.com
Groundhog Day Competition


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

Page created in 0.047 seconds with 24 queries.