Author Topic: SCI 1.1 Template Game  (Read 18467 times)

0 Members and 1 Guest are viewing this topic.

Offline troflip

Re: SCI 1.1 Template Game
« Reply #30 on: June 18, 2015, 01:57:47 PM »
Some of them are kind of random though. Like SpeakWindow (877) (I guess that's game-specific class). And the "controls" class always seems to be 255. I wonder why that is. Is there something special about that number?

Maybe some of the feeling of "clutter" comes from the fact that there are all these game-specific classes with low numbers, and when you look at the script list, the rooms (which is what you generally care about), tend to be scrolled off the list?

I don't necessarily mind moving some of the scripts around in the template game, but maybe we can come to some kind of consensus? There's enough space between 900 and 920 to stuff all those low-numbered scripts, for instance. Or maybe we can "reserve" the 800-900 to these types of game-specific classes (instead of 10-9, like seems to be done now)? I dunno...

Also these seem like they should be deleted:
GravMover.sc
Cat (as you mentioned)
VelocityMover.sc
commandWindow.sc  (is this related to the command verb in SQ5?)

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

Offline Cloudee1

Re: SCI 1.1 Template Game
« Reply #31 on: June 18, 2015, 02:05:51 PM »
That's fine... I am going to keep moving forward with my rearranging. I am trying to get the game.sh file definitions in as well so that will make moving them again later much easier. As well as tracking down the scriptid(xxx stuff and getting the definitions in there instead of the hard coded number.

I didn't expect this to be the final iteration, but it is a big step towards making it easier to achieve.

Some of the cycle classes, I definitely think should be combined though. They aren't ever going to get used much and they aren't that big to begin with... ie Osc and ROsc. But like I said, we can get all that sorted out later on.

I figured once I got them all somewhat together, I would go ahead and attach a copy to a post so that it was available to grab for whoever wants to add their two cents in the final arrangement
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline Collector

Re: SCI 1.1 Template Game
« Reply #32 on: June 18, 2015, 08:58:15 PM »
If a standard is to be set it might as well be the way Sierra did it.
KQII Remake Pic

Offline Cloudee1

Re: SCI 1.1 Template Game
« Reply #33 on: August 19, 2015, 01:22:14 PM »
So the changeScore method of game and the addtoscore procedure should both work about the same.

addtoscore checks and sets a btest value whereas the changescore just simply adds to the score.

Both work, however changescore has an issue... it updates the score, but not the status line that displays the score.


Just so there was a way to change the score without needing the btest flag, my fix was to add a new public procedure by the same name to the main script which I just stuck all the way at the bottom. Then I added the procedure name to the export list. commented out the method in the game script and finally went into the couple of files that did call out the send gGame changescore and changed those to call the procedure instead.... but if anyone knows a better way to fix the SL:doit... that would be much better.

« Last Edit: August 19, 2015, 01:31:09 PM by Cloudee1 »
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline troflip

Re: SCI 1.1 Template Game
« Reply #34 on: August 19, 2015, 05:06:28 PM »
Just a quick thing that seemed to work is to add this line to the end of main's init:

Code: [Select]
(SL:code(statusLineCode))

SL:doit calls its code's doit method. So assigning it statusLineCode makes it run that.

Looks like it was just a "bug" in SQ5, which didn't matter since no code used it.


(As an aside, when would you want to change score without a flag?)
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Cloudee1

Re: SCI 1.1 Template Game
« Reply #35 on: August 19, 2015, 08:47:22 PM »
For instance if you get a point when you click with and item, and in the end of it, the item is taken away then there seems little point to check a flag. Likewise if you interact with a view which results in the view disappearing, again no reason to check a flag.

I have already had to bump up the number of flags that the game makes use of, in some cases like those mentioned I don't need a flag, just to up the score.

As far as it being a bug in SQ5, I checked kq5,kq6, sq5, and some other game, can't think of it now but the changeScore wasn't used in any room and the SL doit method of game was identical in all. I wrote up a quick tutorial adding a ChangeScore procedure... Is this lil bug something that you are going to squish for the final release? If so, I'll rewrite the first add to player score tutorial to show both methods and ditch the modification tutorial. If not, I'll probably just leave them as is.
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline troflip

Re: SCI 1.1 Template Game
« Reply #36 on: August 19, 2015, 09:06:24 PM »
No, I don't think I'll change the template game code - for this release of SCI Companion, I'd rather keep it as close as possible to the original code, and I want to avoid any unforeseen side effects in case we're not understanding something properly.

For those usage cases you mentioned, I would still recommend using a flag (for instance, "if you interact with a view which results in the view disappearing", you'll need to know not to init the view next time the room is entered, so you'd want a flag). A flag takes up a minuscule amount of memory and prevents any bugs involving the score being add to more than once (from what I recall, a common occurrence in fan-made SCI0 games).

For games where you have an unbounded score - maybe like a fighting game, or something like that - then your tutorial to fix it makes sense.
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.043 seconds with 21 queries.