Author Topic: SCI0 Help?  (Read 5012 times)

0 Members and 1 Guest are viewing this topic.

Silver98

  • Guest
SCI0 Help?
« on: August 14, 2015, 02:51:12 AM »
Hello, SCI community. This is my first post here and I've already made certain that I've brushed up on the rules. I've began dabbling in SCI programming for around 2 months now and already have a pretty good game going in SCI0. I would be making the game in SCI1.1 if I had known about it sooner (I loved Frontier Pharmacist and always wanted to make a game like it). But I'm stumped in a few areas. First and foremost, a (bug?) problem with the MTBLAST sound driver when playing back wave files. On occasion, if a wave file is called when one is already being played, the first will finish and static will ensue. After the static, the game will cycle between the many wave files in the resource packages at varying pitches and speeds. All MIDI output is also halted during this mess. If the menubar is clicked or the room is left, everything returns to normal. I want to fix this because there's several waves in my game that serve as Easter Eggs. The next problem is with the inventory and making extra doors work. Whenever I add an item to the inventory and try to pick it up in-game, the game throws up an Oops error followed by the engine number, then promptly crashes. And the thing about the doors is that I can't seem to get 2 doors in 1 room working. I can however get a door and, for example a hole, working. Since I'm fairly new to SCI, I'm probably overlooking something. Any help would be much appreciated. Thanks in advance.



Offline Cloudee1

Re: SCI0 Help?
« Reply #1 on: August 14, 2015, 07:47:13 AM »
First and foremost, welcome Silver98, it's always nice to see some fresh blood.

I'll start with the doors... the way they should work, is that you would simply need to use a different set of three control lines for the door controls and then applying those to the doors properties in a new Door instance.

Code: [Select]
(instance doorTwo of Door
  (properties
    y 100
    x 195
    view 2
    entranceTo 4
    doorCtrl  ctlTEAL
    roomCtrl ctlMAROON
    doorBlock ctlSILVER
  )
)

But if I remember correctly, I was never really able to get a second door to work properly either, in fact I seem to remember struggling with doors enough that I simply quite using them all together. It has been so long since I have used a "Door" in a game that I'm not sure. Usually when I need a door, I just use a "Prop" and then code in the actual interactions in the users interactions. Using a check in the doit method to see if the user has passed through the door, to change the room and everything else is handled in the handleEvent method.

Code: [Select]
(if(Said('open/door'))
  (if(send gEgo:inRect(143 96 176 101))// Near first door... X1 Y1 X2 Y2
  (doorOne:setCycle(End)) // or if you are using actual doors (doorOne:open())
  )
  (else
    (if(send gEgo:inRect(10 96 44 101))// Near second door... X1 Y1 X2 Y2
    (doorTwo:setCycle(End)) // or if you are using actual doors (doorTwo:open())
    )
    (else
    Print("You are not close enough to a door to open it.")
    )
  )
)

Are you using sciAudio to play your wave files in sci0? The version of SCI that you are using only handles midi files natively. I'm not sure how it is that you are getting this to work at all.

By the way, in a day or two I will probably move this thread to the syntax help board.
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline MusicallyInspired

Re: SCI0 Help?
« Reply #2 on: August 14, 2015, 11:38:32 AM »
Actually, SCI0 does use WAV files natively and a program was included with the sound tools pack I'd made called addwave.exe that appends a WAV (which must be 11khz 8-bit and the resulting sound file must be no bigger than 65535 bytes) to an existing sound file. If you're using sndblast.drv or mtblast.drv it'll play the appendes digital sound rather than the MIDI sound.

I've never run into this problem, though, as I've not tried using digital sounds very much yet in SCI0, certainly not two at a time
 It should have just overlapped one with the other. My suggestion would be to try to program it so that it doesn't overlap two sounds at once. It should just silence the previous sound when playing a new one. SCI0 isn't capable of playing more than one sound at once, MIDI or no.
« Last Edit: August 14, 2015, 11:54:47 AM by MusicallyInspired »
Brass Lantern Prop Competition

Offline Collector

Re: SCI0 Help?
« Reply #3 on: August 14, 2015, 11:40:36 AM »
It is also included in the SCI Sound Utilities, which gives you a GUI and batch processing.
KQII Remake Pic

Silver98

  • Guest
Re: SCI0 Help?
« Reply #4 on: August 14, 2015, 05:49:37 PM »
Ah. So for the most part, I can just repeat the same information used for that hole I mentioned (stepping on it leads to a new room). Makes sense, I guess. And the wave files are being used in SCI0 natively since I found a program to convert sounds to the required format, and addwav.exe was the program used for appending the sound to a resource. Re-programming the sounds is a bit of a challenge, though. I'm intending to include full voice-over in my game. What with all these limitations, I might jump ahead to SCI1.1. I didn't get the inventory problem fixed yet, though.

Offline Collector

Re: SCI0 Help?
« Reply #5 on: August 14, 2015, 06:41:48 PM »
Various SCI audio tools can be found  here: http://sciwiki.sierrahelp.com//index.php?title=SCI_Audio_Utilities

For speech in SCI0 use sciAudio. For embedding wav files in SOUND resources use the SCI Sound Utilities.
KQII Remake Pic

Silver98

  • Guest
Re: SCI0 Help?
« Reply #6 on: August 14, 2015, 06:59:11 PM »
Right, thanks then. I just took a quick look at sciAudio and tried to put it into my game, but SCI Companion crashes when I compile the script. How exactly can I get sciAudio working?

Offline Collector

Re: SCI0 Help?
« Reply #7 on: August 14, 2015, 08:59:23 PM »
Take a look at the tread for sciAudio: http://sciprogramming.com/community/index.php?topic=634.0 Also see the documentation that came with sciAudio. You can also look at "LockerGnome Quest Redux" and "120 Degrees Below Zero". Both include source that can be referred to for examples.

http://sciwiki.sierrahelp.com//index.php?title=LockerGnome_Quest_Redux or http://sciprogramming.com/fangames.php?action=review&id=174

http://sciwiki.sierrahelp.com//index.php?title=120_Degrees_Below_Zero or http://sciprogramming.com/fangames.php?action=review&id=187

KQII Remake Pic

Silver98

  • Guest
Re: SCI0 Help?
« Reply #8 on: August 14, 2015, 09:00:59 PM »
Alright, will do. Thanks for your help folks, now a lot of my confusion's gone and out the window.

Offline MusicallyInspired

Re: SCI0 Help?
« Reply #9 on: August 14, 2015, 09:06:33 PM »
I don't much see the point in that. We'd rather you stay and be a part of the community. We're still small, despite our age. And any questions asked and answered are questions that others would ask and want answers for as well. It's valuable information.
Brass Lantern Prop Competition


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

Page created in 0.067 seconds with 22 queries.