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.


Topics - robbo007

Pages: 1 [2]
16
SCI Development Tools / Running SCI0 on Atari ST
« on: August 25, 2023, 07:09:27 AM »
Hi guys,
I decided to test my game code on my Atari ST as a proof of concept. I copied all the executable files from the Atari version of LSL3 which uses the interpreter is version 1.002.026 ran the Atari ST version of the Sierra installer to make sure hardware was all detected and resource.cfg written. Game loads fine. Seems to load rooms etc. Crashes when I try and type something. Not sure if its because I'm using Brian's s hack for the User interface? (Something I need to change at a later stage). http://sciwiki.sierrahelp.com//index.php?title=SCI_Studio_Tutorial_2#User_Interface

Could this be causing the crash? Could it be the Atari ST interpreter version I'm using? I don't want to spend much time on this just curious as this is another massive rabbit hole to go down and now is not the time. There is also the Amiga also. I've not got one so I cant test it :)

Thanks,
Rob


17
SCI Syntax Help / MachineSpeed syntax on real hardware
« on: August 17, 2023, 01:01:49 PM »
Hi guys,

I'm trying to get the "MachineSpeed" synatx working when I test my game on real hardware, IBM XT, IBM AT and a 486.

From the LSL3 code in room 250 (Casino exterior) they used it to init the fountain view if the machine was faster than a IBM XT.

Code: [Select]
(if (> machineSpeed pc8088)
(aFountain init)
)
In the 000.sc (Main.sc) the only reference I can see is this. I cant seem to find pc8088 defined anywhere else?

Code: [Select]
(if (> scoreDisplayed score)
(if (> machineSpeed pcAT)
(-- scoreDisplayed)
else
(= scoreDisplayed score)
)
(StatusLine doit:)
)

(if (< scoreDisplayed score)
(if (> machineSpeed pcAT)
(++ scoreDisplayed)
else
(= scoreDisplayed score)
)
(StatusLine doit:)
)


So I've defined gMachineSpeed in my main.sc under the local section and in my script I'm using it. It does not seem to work properly. It does not load the view on both IBM XT and 486. It should load the view on the 486 as its a faster machine. How does it know the the machine speed is greater than 16? What is it using to know this? Am I missing something? Do I need to define this in another script?

Code: [Select]
; Machine speed used for real hardware
gMachineSpeed


Code: [Select]
(if (> gMachineSpeed 16)
(aFountain init:)
)

18
SCI Development Tools / Importing BMP into SciCompanion problems
« on: August 16, 2023, 05:15:07 AM »
Hi,
Just wondering if anyone else has issues when importing .bmp's into Sci-companion.

I click new pic, import bitmap to pic then browse my hard disk for the .bmp file. Click open and nothing, it just goes back to the convert bitmap to pic screen. Same happens when I try and import a bmp sequence into a view. blank screen.

The only way I can get it working is to open the images in ms-paint copy and then click on import bitmap to pic then the image is displayed in the import window. Same for Views, I need to copy in ms-paint then go into a new view and paste one by one.

I've tried reinstalling  and same problems. Not sure if this is a known bug?

19
SCI Syntax Help / changeState script
« on: July 06, 2023, 05:17:55 PM »
Hi,
I'm messing around with Room 460 and 470 from LSL3. I've managed to get the changeState working for Larry to press button and move into the elevator. Only trouble is instead of walking into the elevator he glides like a ghost. Not sure why this is happening. Any ideas where I'm going wrong?

Code: [Select]
(method (changeState newState)
(= state newState)
(switch state
(0
)
(1 ; handle the elevator, ego goes to button.
(ProgramControl)
;(= IN_ELEVATOR)
(gEgo
illegalBits: 0
ignoreActors:
setMotion: MoveTo 94 139 self
)
)
(2 ; Ego presses button
(gEgo
cycleSpeed: 1
view: 707
setLoop: 2
setCycle: End self
)
)
(3 ; Done pressing button
(aButton setCel: 1 stopUpd:)
(gEgo setCycle: Beg self)
)
(4 ;Elevator lights move
(gEgo view: 000 loop: 3)
(ProgramControl)
((aLightLeft script?) changeState: 3)
)
(5 ;Wait here until the elevator gets to the ground floor,
;indicated by the LightScript reaching cel 0.
(= seconds 0)
)
(6
(aLightLeft setScript: 0)
;(gTheSoundFX number: 460 loop: 1 play:)
(aDoor setCycle: End self)
)
(7
(aDoor stopUpd:)
(= cycles 10)
)
(8 ; Move ego to elevator door
(gEgo illegalBits: 0 setMotion: MoveTo 70 135 self)
)
(9 ; Ego enters elevator
(gEgo setMotion: MoveTo 72 128 self)
)
(10
(gEgo setLoop: 2)
(= cycles 14)
)
(11
;(gTheSoundFX number: 461 loop: 1 play:)
(aDoor setCycle: Beg)
(= seconds 3)
)
(12
;(gTheMusic fade:)
(gRoom newRoom: 505)
)
(13
(gEgo setMotion: MoveTo 70 154 self)
)
(14
;(gTheSoundFX number: 461 loop: 1 play:)
(aDoor setCycle: Beg self)
)
(15
(aDoor stopUpd:)
(gEgo view: 000)
; (= currentStatus egoNORMAL)
)
)
)
)

20
SCI Syntax Help / SCI0 - Custom buttons, windows and gauges
« on: May 29, 2023, 08:21:39 AM »
Hi guys,
Did anyone ever convert the code from these tutorials to SCI at any point? I've been tackling it but getting very lost.

http://sierrahelp.com/SCI/Tutorials/Tutorial2/chapter07.html
http://sierrahelp.com/SCI/Tutorials/Tutorial2/chapter08.html
http://sierrahelp.com/SCI/Tutorials/Tutorial2/chapter09.html

Regards,
Rob



21
SCI Syntax Help / SCI0: Actors and scripts
« on: May 12, 2023, 09:18:40 AM »
Hi,
I'm trying to get my actor walking behind the bar to create a random moving effect. I've tried using the actors instance method init and it works but I need more than one setMotion: MoveTo (left to right) so I think I need to use a change state script. How do you trigger a changestate from a instance of an actor. Because my code does not trigger it or I've got the changestate syntax wrong? Do I need a (method (doit) somewhere possibly?

Code: [Select]
(instance aIsabella of Act
(properties
view 226
loop 1
x 191
y 76
cycleSpeed 5
)
(method (init)
(super init:)
(self
setPri: 7
setScript: aIsabellaScript
;;; cycleSpeed: 0
;;; loop: 1
setCycle: Walk
;;; setMotion: MoveTo 145 76

)
)
)
(instance aIsabellaScript of Script
(properties)

(method (changeState newState)
(= state newState)
(switch state
(0 ; Handle state changes
)
(1
; Walk Isabella to left of bar.
(aIsabella setMotion: MoveTo 145 76) (aIsabella view: 226 loop: 1 setCycle: End)
;repeat
(self changeState: 0)
)
)
)
)

22
Hi,
Just wondering if its possible to use multiple Roland MT32 patch files/sound banks in a SCI0 game? Can they be pushed to the device mid game? Or does it only load them when it initialises the driver at startup?
Thanks,

23
SCI Syntax Help / SCI0: doors
« on: April 20, 2023, 06:40:18 AM »
Hi guys,

Having some issues with my doors. I'm using the control colours to control it and the templates door script. What's happening is when you type "open door" and your not on the navy control colour it says "Not close enough", which is correct. But if you type "open door" again it says "It is" which is not correct.

What I think is happening is its running the (aDoor open:) which is the template door script then checking ego is not on the navy control, then its setting my variable to "open" as its defined straight after the (aDoor open:). Is there a way to set only the  "open" variable if the (aDoor open:) has finished opening the door ?

Code: [Select]

(local
bardoor = "closed"
)

(aDoor init:)

(if(Said 'open/door')
(if (== bardoor "closed")
(aDoor open:)
(= bardoor "open")
else
    (PrintItIs)
    )
)
    (if(Said 'close/door')
    (if (== bardoor "open")
    (aDoor close:)
    (= bardoor "closed")
    else
    (PrintItIs)
    )
)

(instance aDoor of Door
(properties
view vRoom
loop lDoor
x 183
y 93
doorCtrl ctlNAVY
roomCtrl                 ctlGREEN
doorBlock         ctlYELLOW
entranceTo 106
cycleSpeed 4
)

(method (init)
(super init:)
(self
;setCycle: Beg
setPri: 6
)
)
)



24
SCI Syntax Help / SCI0: Title screen menu
« on: March 31, 2023, 05:48:01 PM »
Hi guys,
Has anyone created a title screen menu with start new game, restore or quit? I'm trying to get some example code so I can work out how to tackle this? I like the way the point and click SCI games had this. I want to try and implement this to my SCI0 game.

Thanks,

25
SCI Development Tools / SCI0: Soundblaster / Adlib music
« on: March 06, 2023, 11:49:14 AM »
Hi Everyone,
I'm having some issues getting Adlib/Soundblaster music working with my SCI0 game. I've tried the MTBLAST.DRV and SNDBLAST.DRV from Eric's SCI0 templates Redux. The Roland MT32 music works fine and I've selected a track from LSL3 to test (299), which has the Adlib channels selected: 2,4,6,15. I've tried on real hardware also (Sounblaster Pro2) as well as DOSBOX with a Soundblaster defined. Any ideas why I'm not getting music?

Code: [Select]
(gTheMusic number: 299 loop: -1 play:)
Could it be the driver files I'm using. Does anyone have the link with the SCI0 drivers that work?

Thanks,

26
SCI Syntax Help / SCI0: gTheMusic Roland MT32
« on: February 10, 2023, 07:30:38 AM »
Hi everyone,
I'm trying to get music playing with my test room. I've added the midi sound resource to SC named 299 in my case. I've added to my room script:

Code: [Select]
(send gTheMusic:number(299)loop(1)play())
I get errors compiling that. SCI1 documentation uses a different syntax and that does not work either.

Code: [Select]
// Set the game's music to sound resource 101:
(gMusic1:
    number: 101
    loop: 1
    play:
    hold:
)

I see gTheMusic is defined in the main.sc init section also. I've looked on the wiki's can't seem to find anymore info regarding the sound system. I've seen Grumpy's scripts to use audio but I want to use real Roland MT32 hardware under MSDOS. Is there somewhere else where I need to declare the music script before adding the lines above?

Is there are information on how instrument patches are used and intialised to the Roland when the game starts? Do they need to be declared or imported into SC also?

Thanks,





27
SCI Syntax Help / SCI0: Inventory
« on: February 03, 2023, 09:35:45 AM »
Hi everyone,
I'm trying to get my head around the different ways for picking up objects for the inventory and using control colours or coordinates.

I've seen in the LSL3 source they define a word (sorry don't know the correct terminology for it) which is then to detect if ego is on the control colour or not. If on the control colour ego can then pickup the object.

Code: [Select]
(define nearWood (& (ego onControl) cBrown))
Code: [Select]
(if (Said 'get/wood')
(cond
((!= egoState NORMAL)
(NotNow)
)
((not (InRoom iWood))
(Print "There is no wood lying around here.")
)
((not nearWood)
(Print "Move over until you are beside the small tree
with the gray trunk in the lower right-hand corner
of the scene.")
)
(else
(self changeState getIt)
)
)
)
)

Code: [Select]
;** Pick up the Wood

(getIt
(delay 0)
(= cycles 0)
(Ok)
(HandsOff)
(if (< (ego x) (aWood x))
(ego
illegalBits 0,
setMotion MoveTo (- (aWood x) stoopingOffsetX) (ego y) self,
)
else
(ego
illegalBits 0,
setMotion: MoveTo (+ (aWood x) stoopingOffsetX) (ego y) self,
)
)
)

(atIt
(ego
view vLstooping,
loop (> (ego x) (aWood x)),
cel 0,
cycleSpeed 1,
setCycle EndLoop self,
)
)

(DrBenDover
(aWood hide)
(ego
get iWood,
setCycle BegLoop self,
)
)

(getDone
(NormalEgo)
(theGame changeScore 2)
(Print "You take the beautiful chunk of granadilla wood
from beneath the tree.")
)
)
)
)

Brian's code is a little different as his examples are using co-ordinates and not colour controls.

Code: [Select]
(if(Said('take/key'))
  (if(send gEgo:has(INV_KEY))
    Print("You already have it!")
  )(else
    (if(send gEgo:inRect(150 150 170 170))
      Print("O.K.")
      (send gEgo:get(INV_KEY))
      (theKey:hide())
    )(else
      Print("You're not close enough!")
    )
  )
)

So my questions are which way is the better way to have Ego pickup an object? Using colour control or sending ego to coordinates? Maybe the Sierra way is a little more complex to start off than a basic check if ego is close to object and doe snot have it already, then pickup.

With regards to the Sierra source would this:

Code: [Select]
(define nearWood (& (ego onControl) cBrown))
Work like this:

Code: [Select]
(define nearWood (send gEgo:onControl()) ctlBROWN)

28
SCI Syntax Help / SC0 vRoom view
« on: January 26, 2023, 09:34:22 AM »
Hi guys,
I'm trying to work out how to add animated views to my pics. I'm testing with a portion of LSL3 code from the room and the casino fountain view.

I've declared at the start of my script the vRoom:
Code: [Select]
(define vRoom 250)
(define lWaterfall 0)

And at the end of my Instance RoomScript of Script this code:

Code: [Select]
(instance aFountain of Script
(properties
view vRoom
loop lWaterfall
x 194
y 148
cycleSpeed 1
)

(method (init)
(super init)
(self
isExtra TRUE,
setCycle Forward,
setPri 11,
)
)
)
) ;End Method
) ;End Instance

I'm getting an expected an expression error. Is this the correct way to add animated views to pics? Sorry for my basic questions.
Regards,

29
SCI Development Tools / Brackets Bracket and more Brackets errors
« on: January 13, 2023, 11:20:40 PM »
Hi guys,
Sorry for the n00b questions. I've assigned some time to try and learn SCI0 using SciStudio 3.0. I've been going through the tutorials that are online and having some issues with testing the said command.

Code: [Select]
(instance RoomScript of Script
(properties)
(method (handleEvent pEvent)
        (super:handleEvent(pEvent))

(if (Said 'look>')
  (if (Said '/door')
    (Print {The door is blue!})
  else
    (if (Said '/tree')
      (Print {The tree is bright green!})
    else
      (if (Said '[ /* , !* ]')
        (Print {You are in an empty room.})
      )
    )
  )
)
; Cond version
(if (Said 'look>')
  (cond
    ((Said '/door')
      (Print {The door is blue!})
    )
    ((Said '/tree')
      (Print {The tree is bright green!})
    )
    ((Said '[ /* , !* ]')
      (Print {You are in an empty room.})
    )
  )
)

I'm getting the error: Out bracket (')') expected.

I've looked through the code but can't see where the closing bracket is needed? Any help much appreciated.


Pages: 1 [2]

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

Page created in 0.06 seconds with 18 queries.