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 - robbo007

Pages: 1 [2] 3 4 ... 8
16
SCI Syntax Help / Re: SCI0: Issues implementing Trite Phrase Menu item
« on: November 05, 2024, 12:35:32 PM »
Sorry for the hiatus.

So I have in my main.sc

Code: [Select]
(User alterEgo: gEgo blocks: FALSE x: -1 y: 150)

I don't have the "echo SPACE" syntax as it does not like it. I'm not sure if its needed?

I've tried to simplify the command a little more in my 290 script:
Code: [Select]
(= gExpletive ;this is causing startup not to work
(Format @gExpletiveBuffer 290 1)
)
If I use %s in my text file 290 1 it works but does not show a default Trite phrase when selecting it from the menu. You can enter in a new one and it seems to work fine. If I change the %s for "Have a nice day" that's when it crashes on the ProgramControl syntaxes.





17
SCI Development Tools / Re: SCI Script Compiler - Open Sourced!
« on: October 30, 2024, 06:53:29 AM »
Great news! Can you say what other original Sierra assets are owned by Digital Alchemy Studios?

EA brought out Codemasters a few years back. I know EA own's the rights to LSL as I had a meeting with them to try and secure the license but EA being EA did not want to allow anyone to use the IP :(

It would be good to know who has the other IPs from Sierra? Microsoft I gather?

18
SCI Development Tools / Re: BMP to Vector converter utility
« on: October 30, 2024, 06:18:02 AM »
Erik mentioned he can tinker a little more to get even more reduction in file size. Fingers crossed. Did you see anything that could be bettered? So I can let him know.
Thanks,

19
SCI Development Tools / BMP to Vector converter utility
« on: October 28, 2024, 12:28:20 PM »
Hi guys,
In my never ending search to try and reduce the size of a picture when using the "Import BMP to PIC" option in SciCompaion. I reached out to Erik who created a similar utility for the AGS engine back in 2000.

He has now created SCIVEC, which is a nice little utility that converts a bmp file into a SCI Companion compatible "patch" picture file. This can then be imported using the IMPORT menu. The initial results are good and the picture size is about 15% smaller than than if importing via SciCompanion directly. He is planing to tinker a little more with the code to get reduce the size even more.

This is great if you draw your pictures in an external drawing program like Aseprite and then want to run your games on real hardware where space is very limited. Or to go even one step further and release your game on floppy disks :)

Here is the link to the utility: https://github.com/erkkah/scivec

Regards,



20
SCI Syntax Help / Re: SCI0: Issues implementing Trite Phrase Menu item
« on: October 04, 2024, 11:01:11 AM »
Amazing thanks for the pointer. I did not know that syntax. It works very well. I find it easier to understand the stack than the actual debug code.

So its seems its failing on all startup rooms that have the:

(PlayerControl)
(ProgramControl)

If I comment these out it gets to my first room #29 then crashes with the infamous out of heap space error.

I see in room 29# I have:

Free Heap: 2022 Bytes
FreeHunk: 40KBytes

Maybe putting the Trite menu item in the main.sc is a bad idea? As it uses more memory right? In LSL3 they don't seem to use it in the main.sc

What things can help free up Heap and Hunk? I think I need to optimise my code a little more.


21
SCI Syntax Help / Re: SCI0: Issues implementing Trite Phrase Menu item
« on: September 29, 2024, 03:09:55 PM »
Hi,
I did, I've got gExpletive defined in my main.sc. Recompiled all.
Regards,

22
SCI Syntax Help / SCI0: Issues implementing Trite Phrase Menu item
« on: September 26, 2024, 04:35:18 PM »
Hi guys,
I'm trying to implement something like the Trite Phrase used in LSL2 or the Expletive in LSL3. The LSL2 version seems a lot simpler but I'm getting a crash when using the code in my main.sc

I've added the following to my main.sc
Code: [Select]
(= gExpletive (Format @gExpletiveBuffer 976 0)) ; "Have a nice day."
and I've added the following to menubar.sc

Code: [Select]
(AddMenu
{ Action_}
{Pause Game`^p:Inventory`^I:Retype`#3:--! :Colors`^c :Ask about`^a :Boss Key`^b :Lowe-O-Meter\05`^h :Expletive`^x};:Expletive`^x
)

Code: [Select]
(MENU_EXPLETIVE
(GetInput (Format @temp4 gExpletive) 38
{Enter your favorite expletive:}
)
(if (> (StrLen @temp4) 4)
(Format gExpletive @temp4)
)
)

The game.sh has:
Code: [Select]
(define MENU_EXPLETIVE $0309)
And I have a text file created 976 with the 0 entry holding "Have a nice day"

I get the opps error when starting my game. Using the debug commands I see its getting stuck in room 290 init. This room runs a speed checker for real hardware at startup.

Code: [Select]
(method (init)
(ProgramControl)
(= gProgramControl FALSE)
(SL disable:)
(TheMenuBar hide:)
(super init:)
(gEgo
view: 290
posn: 20 100
setStep: 1 1
setMotion: MoveTo 3000 100
setCycle: Walk ;even though view.290 has only one frame, the overhead of a Cycler makes the simulation more realistic.
init:
)
(gGame setSpeed: 0)
)






23
SCI Syntax Help / Re: SCI0: Events claimed Flags etc
« on: August 11, 2024, 04:58:12 PM »
I think I was trying to use the events and flags for something that could easily be achieved with less hassle. I managed to do the following:

Code: [Select]
(if (== gPreviousRoomNumber 976)
(aTaxi init:)
else(aTaxi hide:)
)

This only runs the intro taxi sequence when coming from the Initroom at the start of the game.

I still don't understand how events claimed work or how to use flags and where to use all this.

24
SCI Syntax Help / Re: SCI0: Events claimed Flags etc
« on: August 03, 2024, 07:20:09 AM »
Here is the full taxi script:

Code: [Select]
(instance aTaxi of Act
(properties
view 607
x 9
y 97
loop 0
)

(method (init)
(super init:)
(self
setPri: 6
;setCycle: End
setScript: aTaxiScript
cycleSpeed: 4
;stopUpd:
)
)
)

(instance aTaxiScript of Script ;
  (method (handleEvent pEvent)
  (super handleEvent: pEvent)
 )
  (method (changeState newState)
    (switch (= state newState)
(0
(ProgramControl) ;hands off
(= seconds 5) ; wait 10 seconds
(Print {"A year later...})
)
(1
(Print {"Seeya round buddy", shouts the taxi driver.})
(client
illegalBits: 0
cycleSpeed: 0
setLoop: -1
setCycle: Rev
setMotion: MoveTo -52 97 self
)
(PlayerControl) ;hands on
(SetFlag 20)
)

)
)
)

So what I was trying to do with the setflag procedure was if not detected flag 20 (eg the changestate has not been run yet and the flag was not set)  then init the taxi. If the changestate has been run and the flag has been set then don't init the taxi.

Maybe there is a better way to do this? I was copying the setflag and testflag from some of the rooms in LSL3. I've also seen event claimed when using SAID but not sure if that can be used to control if a changestate like my taxi script has been run or not?
Regards,

25
SCI Syntax Help / SCI0: Events claimed Flags etc
« on: July 31, 2024, 06:33:36 PM »
Hi guys,
Could someone help out and shed some light on how flags and claimed events work? I'm trying to have a changestate run once in a room. When ego walks back into the room I don't want the changestate to run again. I was trying to copy the LSL3 source using a flag procedure but its not working.

Code: [Select]
(procedure (SetFlag flag)
(= [gFlagArray (/ flag 16)]
(| [gFlagArray (/ flag 16)] (>> $8000 (mod flag 16)))
)
)
(procedure (TestFlag flag)
(return
(if (& [gFlagArray (/ flag 16)] (>> $8000 (mod flag 16))) 1 else 0)
)
)

Code: [Select]
(if (not (TestFlag 20))
(aTaxi init:)
)

Code: [Select]
(method (changeState newState)
    (switch (= state newState)
(0
(ProgramControl) ;hands off
(= seconds 5) ; wait 10 seconds
(Print {"A year later...})
)
(1
(Print {"Seeya round buddy", shouts the taxi driver.})
(client
illegalBits: 0
cycleSpeed: 0
setLoop: -1
setCycle: Rev
setMotion: MoveTo -52 97 self
)
(PlayerControl) ;hands on
(SetFlag 20)
)
)
)
)

Thanks :)

26
SCI Syntax Help / Re: SCI0: RegionPath Wandering
« on: June 20, 2024, 04:42:39 PM »
Thanks everyone. I got it working. It was good to see how the debugging tools work a little more also.

The problem was with the nextRoom method. It seems to need to have the previous room set and not the actual room where the bikini lady starts. (In my case the bikini lady starts walking from room 28)

Code: [Select]
(method (nextRoom)
(if
(and
(== (self at: (+ 2 value)) 3)
(== gRoomNumber 32) ; Quicki Mart
(gCurRoom notify: 0)
)
(repeat
(-= value 2)
(breakif (== (self at: (+ 1 value)) 32767))
)
)
(super nextRoom: &rest)
)
)

27
SCI Syntax Help / Re: SCI0: RegionPath Wandering
« on: June 05, 2024, 03:32:25 PM »
BTW. scummvm does not seem to "recognise" my game hash. So I never got it running with it.

Edit: How did you see the error message in scumm if it wont run the game?

Thanks for the tips. I really appreciate this as it really helps me grasp the SCI language.
So I got the error from the SCIV debugger. I tried my game a while back in the scumm engine and that's when I got the hash error.

28
SCI Syntax Help / Re: SCI0: RegionPath Wandering
« on: June 05, 2024, 12:22:07 PM »
Clearly the stack is read bottoms-up, considering the bottom item is (LSL4 play:).

Just checking :)

29
SCI Syntax Help / Re: SCI0: RegionPath Wandering
« on: June 05, 2024, 11:58:43 AM »
ok thanks. Yeah I think I'm getting into deep waters here. I understand the concept of stacks from assembly but as there is still quite a bit for me to learn in SCI I'm getting a little lost. I might have to put this script on hold for the time being until I advance with the other rooms and hopefully learn more. Then I can come back to this. Ive been on it for days now. LOL

BTW. scummvm does not seem to "recognise" my game hash. So I never got it running with it.

PS: Is the stack read from bottom to top? Meaning last item to load is on the top? If so that might point to the nextroom method in the beachwalkers path script. hmmmm


30
SCI Syntax Help / Re: SCI0: RegionPath Wandering
« on: June 04, 2024, 05:47:00 PM »
The setRegions message is being sent to addToPics. Why is that? That bit got left out (and was probably a copy-paste error when you wrote the post). Was this as intended? You're supposed to send it to a Room instance (i.e. self in most cases).

Sorry yes I had the syntax wrong. I've now corrected it and added it under the (super init:) but now get an not an object error in debug. hmmm

Code: [Select]
(self setScript: RoomScript)
(self setRegions: 301)   ; Testing water bikini script

Debug error:
"PMachine
Not an object: 0$"


Pages: 1 [2] 3 4 ... 8

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

Page created in 0.029 seconds with 20 queries.