Community

Community Affairs => Forum Support and Suggestions => Topic started by: JRedant on June 28, 2019, 08:26:02 PM

Title: Trouble with SCI Companion
Post by: JRedant on June 28, 2019, 08:26:02 PM
Hey guys! Long time no see.

So I'm starting up a live stream of real-time game development.

And I find myself stuck. What am I doing wrong?

Here is the page in question:

http://scicompanion.com/Documentation/Tutorial/RoomBackground.html

And here is the code that I think I'm supposed to be using:


(instance rm110 of Room
   (properties
      picture 110
      style (| dpANIMATION_BLACKOUT dpOPEN_FADEPALETTE)
      horizon 50
      vanishingX 130
      vanishingY 50
      noun N_ROOM
   )
   
   (method (init)
      (AddPolygonsToRoom @P_Default110)
      (super init:)
      (switch gPreviousRoomNumber
         ; Add room numbers here to set up the ego when coming from different directions.
         (else
            (SetUpEgo -1 1)
            (gEgo posn: 60 130)
         )
      )
      (gEgo init:)
      ; We just came from the title screen, so we need to call this to give control
      ; to the player.
      (gGame handsOn:)
      (theBox
          approachVerbs: V_DO
          init:
      )
      (redBox
          approachVerbs: V_DO
          init:
      )
      (painting:
          setOnMeCheck(omcPOLYGON CreateNewPolygon(@P_Painting))
          init()
      )
   )
)


This is throwing out the following error:

Error: Expected an expression (111,3): "painting"

Where did I mess up?
Title: Re: Trouble with SCI Companion
Post by: lskovlun on June 29, 2019, 12:34:27 AM
This looks like a weird mix of SCI Studio and Sierra syntax. In particular, the expression that's throwing an error is in SCI Studio syntax. You can change it as follows:
Code: [Select]
      (painting
          setOnMeCheck: omcPOLYGON (CreateNewPolygon @P_Painting)
          init:)
(oh, I see it comes from the page you linked to...)
I haven't tested this btw, I just rewrote it mechanically in the new syntax.
Title: Re: Trouble with SCI Companion
Post by: Kawa on June 29, 2019, 03:25:53 AM
Go to the picture editor, draw a polygon named "Painting".
Title: Re: Trouble with SCI Companion
Post by: JRedant on June 29, 2019, 09:20:45 AM
Kawa: Did that.
Title: Re: Trouble with SCI Companion
Post by: JRedant on June 29, 2019, 09:21:57 AM
This looks like a weird mix of SCI Studio and Sierra syntax. In particular, the expression that's throwing an error is in SCI Studio syntax. You can change it as follows:
Code: [Select]
      (painting
          setOnMeCheck: omcPOLYGON (CreateNewPolygon @P_Painting)
          init:)
(oh, I see it comes from the page you linked to...)
I haven't tested this btw, I just rewrote it mechanically in the new syntax.

Yup! That worked. Thank you.

Who do I report to to have that code changed?
Title: Re: Trouble with SCI Companion
Post by: JRedant on June 29, 2019, 09:27:28 AM
That's resolved and working as expected.

I think I inadvertently became a Beta Tester for the new API.
Title: Re: Trouble with SCI Companion
Post by: Collector on June 29, 2019, 10:49:49 AM
Yup! That worked. Thank you.

Who do I report to to have that code changed?

That would be up to Phil.

BTW, welcome back, JRedant.
Title: Re: Trouble with SCI Companion
Post by: JRedant on June 29, 2019, 12:02:50 PM
Thank you!

Oh incidentally . . . this is all part of my current project . . . a kind of real-time development on YouTube, where I steam every single part of the game development.

Game Dev (Werewolves and Wanderer): https://www.youtube.com/playlist?list=PLUXBHpzHsJ3oiIP7JKf7vpBQrmp7LqEl7

So it will be dull and boring.

It does keep me going with my interest factor.

I watched too many critic videos and video gaming streams. I get bored when I try to do one. And kept thinking "there isnt any point to this is there?" I can tear apart games like AVGN or Markiplier. I can be a self pompous jerk like Darksydephil or Nostalgia Critic. Or I could look in depth in games and give thoughtful reviews like Rerez.

None of that interests me.

I would rather make one.

If anything, just to show people how long the process takes and how much passion and patience you need to make one. From start to finish.

That's my drive for this project and i might be able to finish it this time.
Title: Re: Trouble with SCI Companion
Post by: OmerMor on June 29, 2019, 02:28:43 PM
Who do I report to to have that code changed?

You can just send Phil a pull request via github. The source for this page can be found here:
https://github.com/icefallgames/SCICompanion/blob/master/SCICompanion/Docs/source/Tutorial/RoomBackground.rst (https://github.com/icefallgames/SCICompanion/blob/master/SCICompanion/Docs/source/Tutorial/RoomBackground.rst)
Title: Re: Trouble with SCI Companion
Post by: JRedant on July 04, 2019, 03:17:07 PM
Okay . . . I'm an idiot. The Fill button is not working for me.

So, I should be logically seeing something filled in with a very dark due of grey.

And no matter where I click, nothing is being filled.

What am I doing wrong?
Title: Re: Trouble with SCI Companion
Post by: JRedant on July 05, 2019, 09:39:13 AM
I found a work-around. I just can't explain why it works.

I added in a new picture, and now it works just fine.
Title: Re: Trouble with SCI Companion
Post by: JRedant on July 06, 2019, 01:13:45 PM
Palette question:

So I just defined 16 colors to go along with the 64 pinned colors. So how come it looks different in the actual game (save --> compile all --> rebuild resources) than it does in the picture editor? (desired effect: I want the door to be blue)
Title: Re: Trouble with SCI Companion
Post by: lskovlun on July 06, 2019, 04:51:51 PM
Palette insertion vs. replacement... somewhere in your workflow you have a palette that contains the old palette entries (most likely the ego view?), and since it is loaded later than the pic, its old entries replace the altered ones in the pic.
Title: Re: Trouble with SCI Companion
Post by: JRedant on July 06, 2019, 05:01:05 PM
Hmm  . . solution?

Do I go in to the Ego View and match the palettes? Would that do it?
Title: Re: Trouble with SCI Companion
Post by: JRedant on July 06, 2019, 05:12:10 PM
Oh . . . wait, I see it.

This is my title screen. I had imported an image which generated a different palette. The generated palette colours for 64 and 65 seem to be crossing over from the title screen.

Yeah. . . that's the problem.
Title: Re: Trouble with SCI Companion
Post by: JRedant on July 06, 2019, 05:16:58 PM
Okay . . . is there a way to set it so that Title Screen can use "Palette 1" and room 1 can use "Palette 2"?

Or am I married to one and only palette through the entire game?
Title: Re: Trouble with SCI Companion
Post by: JRedant on July 06, 2019, 05:24:03 PM
. . . and it was that easy:

   (method (doit)
           (super doit:)
           (Palette palSET_FROM_RESOURCE 001 2)
   )


Resolved.
Title: Re: Trouble with SCI Companion
Post by: gumby on July 07, 2019, 10:34:18 AM
Hey JRedant, I had a similar issue: http://sciprogramming.com/community/index.php?topic=1780.msg11684#msg11684 (http://sciprogramming.com/community/index.php?topic=1780.msg11684#msg11684).  I was able to use the same workaround that you described by setting the palette in the doit method, but it just feels wrong.
Title: Re: Trouble with SCI Companion
Post by: MusicallyInspired on July 07, 2019, 02:13:36 PM
You should just be able to do it in the init method shouldn't you?