Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - snobes

Pages: [1]
1
SCI Syntax Help / Re: Ego Moonwalk
« on: September 15, 2023, 04:52:59 PM »
Yep. That fixed it. Thank you!

2
SCI Syntax Help / Re: PAvoider not working
« on: September 15, 2023, 02:48:38 PM »
Good to know.

3
SCI Syntax Help / Re: PAvoider not working
« on: September 15, 2023, 02:27:38 PM »
Thanks for the clarification. All makes sense now.

I'll see if I implement an "Avoider" Motion class. Could be useful for future use cases.

4
SCI Syntax Help / Priority of overlapping views
« on: September 15, 2023, 12:23:41 PM »
Hello.

I have a use case where an Actor (a hen) walks in front of a static Actor (an ogre). I want the hen Actor to always take priority when it walks in front of the ogre Actor. My issue is that when the hen enters the "boundary box" of the ogre (meaning the hen does not appear to be in front of the ogre but from a View perspective, the hen has entered the box around the whole ogre view), the hen is no longer clickable ("V_DO-able").

What is the correct way to keep a view on top of another view even within the boundary box.

I have a script that tries to do this, but, like I said, the hen is not clickable when it walks in front of the boundary box of the ogre. Here is my script:


   (method (changeState newState &tmp nextHenX nextHenY)
      (= state newState)
      (= nextHenX (Random 75 75))
      (= nextHenY (Random 140 140))
      (switch state
         (0
            (if (== gKeyholePic CABIN_KEYHOLE_PIC_SLEEP) (self cue:))
         )
         (1
            (ogre init: setCycle: Forward setSpeed: 60) ; init the ogre
                 (self cue:)
         )
         (2
            (if (not (gEgo has: INV_HEN))
               (hen posn: 87 159 init: ignoreActors: FALSE setSpeed: 3 setCycle: StopWalk -1) ; init the hen
               (self cue:)
            )
         )
         (3
            (hen setMotion: PolyPath nextHenX nextHenY self) ; move the hen (could possibly get moved in front of the ogre)
         )
         (4
            (= seconds 1)
         )
         (5
            (self changeState: 3)
         )
      )
   )


; the hen Actor
; this should take priority over the ogre
(instance hen of Actor
   (properties
      view HEN_VIEW
      signal ignAct
      loop 0
      cel 0
      noun N_HEN
   )
   
   (method (doVerb theVerb)
       (switch theVerb
           (V_DO
            (if (<= (self distanceTo: gEgo) 15)
               (rm1701 setScript: getHen)
            else
               (gMessager say: N_ROOM 0 C_NOT_CLOSE_HEN 0)
            )
           )
           (else
               (super doVerb: theVerb &rest)
           )
       )
   )
)

; the ogre
(instance ogre of Actor
   (properties
      view OGRE_SLEEPING_VIEW
      x 242
      y 170
      signal ignAct
      noun N_OGRE
   )
)


I don't know what I'm doing wrong to cause the hen to no longer be clickable when in the ogre's boundary box. Any suggestions would be helpful.

Thanks.

5
SCI Syntax Help / Wander within polygons
« on: September 15, 2023, 12:12:41 PM »
Hello

I'm tying to get an Actor (a hen) to randomly walk around within a bounded region.

I have a script that does this by using Random and PolyPaths, but I wonder if there is a simpler way to do this. In English, the script picks a new x,y coordinate, sends the Actor to that coordinate using PolyPath, then repeats.


   (method (changeState newState &tmp nextHenX nextHenY)
      (= state newState)
      (= nextHenX (Random 75 75))
      (= nextHenY (Random 140 140))
      (switch state
         (0
            (if (== gKeyholePic CABIN_KEYHOLE_PIC_SLEEP) (self cue:))
         )
         (1
            (ogre init: setCycle: Forward setSpeed: 60)
            (self cue:)
         )
         (2
            (if (not (gEgo has: INV_HEN))
               (hen posn: 87 159 init: ignoreActors: FALSE setSpeed: 3 setCycle: StopWalk -1)
               (self cue:)
            )
         )
         (3
            (hen setMotion: PolyPath nextHenX nextHenY self)
         )
         (4
            (= seconds 1)
         )
         (5
            (self changeState: 3)
         )
      )
   )


I'm aware of the Wander class, but this class ignores polygons (I'm using SCI 1.1). Is there a similar class where I can pass in a polygon and only that Actor is affected by the polygon and thus will wander within the specific polygon? Or is what I've implemented the way to "wander" within a bounded region?

Thanks.

6
SCI Syntax Help / PAvoider not working
« on: September 15, 2023, 12:04:17 PM »
Hello.

So I'm trying to use PAvoider since my use case is to have an Actor (a hen) avoid another Actor (the gEgo) (ie. gEgo walks to the hen and the hen walks away and tires to avoid the gEgo). However, I think PAvoider is not meant for this. From the code, the description of PAvoider is:

;   
;    In contrast to the Avoider in SCI0 that makes an Actor avoid certain control colors, this
;    avoider has been adjusted to use polygons for SCI1.1.
;   
;    Example usage::
;   
;       (gEgo setAvoider: PAvoider)


From the description, it sounds like PAvoider is meant to avoid certain polygons, not other Actors. However, I still do not understand which polygons the Actor would avoid if given a PAvoider. I've tried (gEgo setAvoider: PAvoider) in the init of the Room object, but nothing happens. Am I missing something on how to use PAvoider?

As a side note, since most likely PAvoider is not suitable for my use case, is there a class that makes one Actor avoid another Actor?

Thanks.


7
SCI Syntax Help / Ego Moonwalk
« on: September 15, 2023, 11:06:08 AM »
Hello.

I have a bug in my code where after a short automatic sequence, the game is restored back to the player and the gEgo is once again controllable. However, the issue is that when I give control back to the player, the first movement of the gEgo moonwalks if certain conditions are met (by "conditions" I mean the gEgo is facing east and the player clicks west or vice versa).

The sequence is a series of change states to pick up a hen.
Here is what I'm trying to achieve with my code in English (there are two actors: 1) gEgo and 2) hen):
- Remove control from player
- Halt the hen's movement
- Swap out the view of gEgo with a different view where the gEgo bends down and then stands up (ie. pick something up)
- Set the cel of gEgo to 0 so the "pick up" loop will animate from the beginning
- Set the speed of the gEgo to slow down the "pick up" animation
- Based on if gEgo is to the right or left of the hen, set the "pick up" loop of the gEgo correctly (ie. facing west or east, respectively)
- Set the cycle of the gEgo to "bend down"
- Animate the "bend down" cycle
- Dispose the hen
- Put the hen in the gEgo's inventory
- Set the cel of gEgo to 0 so the "stand up" loop with animation from the beginning
- Set the loop of the gEgo to be the "stand up" loop of the "pick up" view
- Set the cycle of the gEgo to "stand up"
- Animate the "stand up" cycle
- Give control back to the player
- Set the view of gEgo to be the normal movement view (ie. up, down, right, left, diagonals, idle)
- Set the speed of the gEgo to what is was before the "pick up" sequence
- Set the cycle of the gEgo to be StopWalk so the gEgo will cycle correctly after the "pick up" sequence
- Give control back to the player
- Set the script back to the general RoomScript

I think my bug is how I'm setting the cycle of the gEgo once the "pick up" animation is complete. Since I set it to StopWalk -1, I it will also set the direction. But since the gEgo is not moving it picks the wrong idle cel. Then when I move the gEgo, the direction is wrong because I did not change the gEgo's cycle and direction correctly.

I would also take other suggestions to make the code cleaner. I'm learning the syntax and the many methods and procedures available. Callout if you see a better way to write what I've described.


(instance getHen of Script
   (properties)
   
   (method (changeState newState &tmp newSpeed)
      (= state newState)
      (switchto state
         (
            (gGame handsOff:)
            (hen setMotion: NULL)
            (self cue:)
         )
         (
            (= newSpeed gGEgoMoveSpeed)
            (gEgo view: ROSELLA_PEASANT_PICKUP_VIEW setCel: 0 setSpeed: (+ newSpeed 2))
            (if (<= (gEgo x?) (hen x?))
               (gEgo setLoop: 0)
            else
               (gEgo setLoop: 2)
            )
            (self cue:)
         )
         (
            (gEgo setCycle: EndLoop self)
         )
         (
            (hen dispose:)
            (gEgo get: INV_HEN setCel: 0 setLoop: (+ (gEgo loop?) 1))
            (self cue:)
         )
         (
            (gEgo setCycle: EndLoop self)
         )
         (
            (DebugPrint {gGEgoMoveSpeed: %d} gGEgoMoveSpeed)
            (gEgo view: ROSELLA_PEASANT_VIEW setSpeed: gGEgoMoveSpeed)
            (self cue:)
         )
         (
            (gEgo setCycle: StopWalk -1)
            (self cue:)
         )
         (
            (gGame handsOn:)
            (rm1701 setScript: RoomScript)
         )
      )
   )
)


Thanks

(I just thought of something.... Perhaps I can have another Actor in the script called "gEgoPickup". This Actor would have the "pick up" view. When the "pick up" sequence begins, I would hide the gEgo, show the gEgoPickup using the x,y of gEgo, animate the "pick up" cycle, hide the gEgoPickup, and then show the gEgo. I'll test this out to see if it works, but I'd think this less ideal than simply acting on the gEgo)

8
You can use breakpoints, sure, but the cursor will do what it wants because of optimizations.

I know you can because that's how I traced out how strings work when I added codepage translation support.

Do you have steps on how to launch with breakpoints attached and able to step through the code? What build configuration allow breakpoints? I'm having a hell of a time figuring out how to do it.

Earlier, Kawa, you said

There's an option in the game-specific settings specifically for source control purposes, it causes all the individual resource files to be handled separately. Not entirely unlike how the Sierra people originally made 'em.

Where is this? I'm looking at "Game/Version detection" but cannot see how to set individual resource files handled separately. Maybe it's already enabled because when I change a polygon the respective .shp file is updated (I see this via git diff), and when I change a message the respective .shm files is updated. However, when I add "Control" or "Priority" commands in the pic editor, only the `resource.000` and `resource.map` files are updated, which are both binary. I'm looking into a way to store these "Control" and "Priority" commands in human readable files. That way I can source control all resources I currently care about (scripts, polygons, and commands). Thoughts on this effort? Already been tried?

9
Okay, so I was misunderstanding what these build configurations do. I realize setting "Kawa/Win32" compiles and packages the code into the target directory (this case the "Kawa" directory). I can compile, create, and run the executable from the target directory.

Perhaps, I'm misunderstanding what "run the application in debug mode" means. To me, that means being able to launch the application via the "Local Windows Debugger" and able to set breakpoints in the code. Is that an incorrect assumption? Thanks for any help.

10
Hello. I'm trying to build and run the application from the github repository. I'm running into some issues that I can't figure out and would appreciate help.

After downloading the repo and installing all the necessary build components (Windows 8.1 SDK, VS 2015 Build Tools), I can successfully clean and rebuild the solution. However, when I launch the Local Windows Debugger (using Kawa / Win32 as the build configuration), I get "path/SCICompanion.sln is not a valid Win32 application". I'm running Visual Studio 2022 on Windows 11. I've seen SO posts saying the issue is the .sln file is not selected when debugging, but I'm pretty sure it is selected. Is my issue is that I'm not launching with the correct build configuration? Or is my issue that Windows 11 can't execute Win32 applications? Or perhaps is it something else entirely?

As a side question, are there pros/cons to setting the Solution Explorer to "Solution View" vs. "Folder View"? "Folder View" makes sense to me as the structure of the files matches what's on disk, but "Solution View" has many configurations supposedly already set and ready to use.

My goal right now is just to get the application launched in a debugger mode via Visual Studio. If there is a guide that I can follow, then please pass it along if it exists. Thanks.

11
There's an option in the game-specific settings specifically for source control purposes, it causes all the individual resource files to be handled separately. Not entirely unlike how the Sierra people originally made 'em.

Cool. I did not know that. Thanks.

The only real problem is that only the script source files are plaintext. Polygon editor's shp and message editor's shm files are just source code in a tightly controlled format though.

Yeah. I've noticed this. Makes it tough to share shp files (and shm) when working on polygons (or messages) separately then want to combine them.

Continuing with the questions to show my Windows inexperience, would there be any issue building SCICompanion from source on a mac by getting a Windows vm or using parallels (https://www.parallels.com/products/desktop/)? I partitioned my mac for bootcamp Windows and was able to build it, but a vm would be less hassle, so I'm gonna try that out.

12
Thanks for the response. One last question:

I'm developing a game with my two brothers. While sending individual script files back and forth is doable, are other SCICompanion game files able to be version controlled? (ie. shp files, etc...) I realize anything can be version controlled because it's just file diffs, but many files (other than scripts) are not easily human readable; thus, resolving merge conflicts is tough. Perhaps the answer to this question will make more sense after getting familiar with how the application works under the hood rather than simple familiarity with using it to make games. But if anyone has tried using version control for whole games, then please let me know your experience. Thanks.

13
Hello.

I'm new to the forum and am wanting to get familiar with the SCICompanion code base/development. I want to make sure I understand the administrative/flow/history of how the forum/project works. Please correct my assertions or provide more information to my answers if possible.

- The most worked on repo is Kawa's fork (https://github.com/Kawa-oneechan/SCICompanion). Is this now the defactor SCICompanion source code moving forward?
- Was there a reason for the fork? Are the original developers no longer contributing?
- Is there documentation about getting your feet wet? (ie. core logic, example PR, etc...)
- Are there requirements for PR submissions?
- Can any issue just get picked up and worked on?
- I'm brushing off my c++ skills (been a year or two). I primarily work in a linux environment. I figure all development is done in a windows environment, correct? I'm not familiar with windows development. Anyone have any luck with developing on a non-windows environment, or do I need to get exposed to windows development for a better experience?
- Are there rules/guidelines to this forum? (ie. tech questions go here, general questions go there, etc...)

Thanks for the responses and help.  :)

14
Confirmed working in SCICompanion 3.2.4.0. The issue must be elsewhere. Thanks for checking!

Howdy. I'm new to the forum. But this post caught my attention. doomlazer, where are you getting SCICompanion 3.2.4.0? I'm at 3.0.1.7 from this site: http://scicompanion.com/download/

Is there another location of downloadable zips of SCICompanion? Thanks

15
SCI Syntax Help / "Generate Lip-sync Data" action button not working
« on: February 06, 2023, 05:34:40 PM »
Hello, everyone!

First time poster, long time Sierra player/fan.

I'm new to SCI programming as of a month (it's been an awesome month so far). I'm experimenting with Talkers and lip syncing and am running into a wall. I'd appreciate anyone's help/suggestions.

I'm trying to generate automatic lip sync data. I've created "lip sprites", created a "phenome_to_cell" file, imported my audio file, and supplied the text. That part I am missing is the "tick to cel" file, which I think should be automatically generated after clicking the "Generate Lip-sync Data" button in the "Advanced" popout window. My issue is that after clicking the "Generate Lip-sync Data" button, nothing happens. No file is generated, and in fact it removes any pre-loaded file with a black "tick to cel" list.

Can someone help me with this issue? I'm basing my knowledge on the SCICompanion website: http://scicompanion.com/Documentation/lipsync.html. I think this is the same application as SCIProgramming (I could be wrong).

Please let me know if I can provide any more information.
Thanks

Version: SCICompanion 3.0.1.7

Pages: [1]

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

Page created in 0.041 seconds with 20 queries.