Author Topic: Voice acting in Space Quest V  (Read 30825 times)

0 Members and 1 Guest are viewing this topic.

Offline aardvark4lunch

Re: Voice acting in Space Quest V
« Reply #15 on: February 11, 2016, 11:47:28 AM »
Don't give up, this just gives us a project to work out together. This place needs activity.

Thanks, I just don't want to come across as someone who demands everyone to do what they want without pulling their own weight.

Offline troflip

Re: Voice acting in Space Quest V
« Reply #16 on: February 11, 2016, 12:12:03 PM »
Not sure what you're got going on exactly (I suspect maybe some turds left over from a previous decompile), but here's a link to a version that works:

https://drive.google.com/file/d/0B7AkuhunCLJTamxyVWxXdlVWVms/view?usp=sharing

It should be able to compile Main.sc just fine (I've already changed the global90 to 2 to enable speech). I added speech to an entry in message resource 110.

It "works" as in it's ready for someone to hack on... but there's no speech actually being heard when you run the game in DOSBox. The speech *does* work in ScummVM though... so that's a start.

It's possible the Sierra SQ5 interpreter just doesn't support the DoAudio kernel call that takes a message entry identifier. Or maybe the audio driver just needs to be changed.
« Last Edit: February 11, 2016, 02:08:39 PM by troflip »
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Kawa

Re: Voice acting in Space Quest V
« Reply #17 on: February 11, 2016, 12:32:50 PM »
Tangentially related, but I did it! I got "both" to work in my game! No more trying to display audio as text!

First, in Talker.sc, I changed Narrator::say:
Code: [Select]
(method (say theText theAudio theCaller)
(if gIconBar (gIconBar disable:))
(if (not initialized) (self init:))
(= caller (if (and (> argc 2) theCaller) theCaller else 0))
(if (& gMessageType $0001) (self startText: theText))
(if (& gMessageType $0002) (self startAudio: theAudio))
; ...
Then in Messager::sayNext:
Code: [Select]
(if (!= theTalker -1)
(talkerSet add: theTalker)
(theTalker modNum: theModNum say: @buffer temp201 self theModNum noun verb case seq)
; temp201 being the audio handle and buffer being the text.
;;; (if (& gMessageType $0002)
;;; (theTalker modNum: theModNum say: temp201 self theModNum noun verb case seq)
;;; else
;;; (theTalker
;;; modNum: theModNum
;;; say: @buffer self theModNum noun verb case seq
;;; )
;;; )
(++ curSequence)
; ...

Offline aardvark4lunch

Re: Voice acting in Space Quest V
« Reply #18 on: February 11, 2016, 12:40:20 PM »
Tangentially related, but I did it! I got "both" to work in my game! No more trying to display audio as text!

That's great to hear :D
Hopefully someone can get it working in SQV.

Offline Kawa

Re: Voice acting in Space Quest V
« Reply #19 on: February 11, 2016, 12:44:22 PM »
Well aardvark4lunch, considering SQV reacted the same way my game did when I last tried to talkify it...

Other thing I've done to SQV: made the log part of the intro type character-by-character.

Offline aardvark4lunch

Re: Voice acting in Space Quest V
« Reply #20 on: February 11, 2016, 12:48:53 PM »
Well aardvark4lunch, considering SQV reacted the same way my game did when I last tried to talkify it...

True. It'd be great if we could get a SQIV style button to switch between them.

Offline troflip

Re: Voice acting in Space Quest V
« Reply #21 on: February 11, 2016, 12:52:23 PM »
The SCI 1.1 template game supports all of this, btw. Text-only, speech-only, or both, with a button to switch between them. So it's just a matter of adapting that code.
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Kawa

Re: Voice acting in Space Quest V
« Reply #22 on: February 11, 2016, 01:33:30 PM »
The SCI 1.1 template game supports all of this, btw. Text-only, speech-only, or both, with a button to switch between them. So it's just a matter of adapting that code.
Does it really support both though? Cos I'm looking at the template right now and it too uses either temp201 or @buffer. It too would logically try to display non-text data if it were set to "both", it seems to me.

Offline troflip

Re: Voice acting in Space Quest V
« Reply #23 on: February 11, 2016, 01:45:24 PM »
It does, try creating a new game, switch into "both" mode and "look" at the room background.

I patterned it after one of the Sierra games that offered a "both" mode (EcoQuest CD maybe?). I remember the code being a little weird, maybe your way is better.

[edit:]
Yeah, when in "both" mode, startText: does some needless calculations for StrLen and ticks (which then gets immediately overridden by startAudio). When display: is called, if the messagetype has the speech flag (0x2), it uses the data in the buffer to obtain the actual text via a call to msgGET.
« Last Edit: February 11, 2016, 01:55:20 PM by troflip »
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Kawa

Re: Voice acting in Space Quest V
« Reply #24 on: February 11, 2016, 02:43:22 PM »
*looks*

Ah.

That's a bit wasteful, innit? Cos no matter the gMessageType value, Messager::sayNext will have its own copy of the actual line.

Edit: It seems EcoQuest doesn't have a Messager -- it invokes Talkers directly, as if using text resources instead of messages.

Edit?: Aw dammit, my research took too long :D
« Last Edit: February 11, 2016, 03:00:33 PM by Kawa »

Offline troflip

Re: Voice acting in Space Quest V
« Reply #25 on: February 11, 2016, 02:58:45 PM »
Yup, looks like it's a waste. Oh well. EcoQuest had a simpler "Messager" that didn't have all that logic in it, so that's why it had that cruft in its Talker.
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline aardvark4lunch

Re: Voice acting in Space Quest V
« Reply #26 on: February 11, 2016, 10:25:01 PM »
It paused for roughly the right amount of time while the speech played

Not sure how true this is. Just recorded quite a long clip and it played for the same short amount of time.

Also, is the last version you uploaded still based on the copy I sent you? Because in the version you uploaded, it has far fewer sound effects to my version. Whirring of the simulator, hissing sound when it opens etc. Not sure if it's just because of different versions, or if it has something to do with the voices not playing either.
« Last Edit: February 11, 2016, 10:35:34 PM by aardvark4lunch »

Offline troflip

Re: Voice acting in Space Quest V
« Reply #27 on: February 11, 2016, 10:56:18 PM »
Not sure how true this is. Just recorded quite a long clip and it played for the same short amount of time.

Ok, then that means it's really not seeing the audio. So that might mean the DoAudio kernel in the SQ5 interpreter just doesn't handle the aud36 resources that are used for speech.

Also, is the last version you uploaded still based on the copy I sent you? Because in the version you uploaded, it has far fewer sound effects to my version. Whirring of the simulator, hissing sound when it opens etc. Not sure if it's just because of different versions, or if it has something to do with the voices not playing either.

Nope, the version I uploaded was based on the original.
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline aardvark4lunch

Re: Voice acting in Space Quest V
« Reply #28 on: February 11, 2016, 11:00:31 PM »
Not sure how true this is. Just recorded quite a long clip and it played for the same short amount of time.
Nope, the version I uploaded was based on the original.

So whatever we've done that's stopped the sound effects from playing might be the same thing that's stopping speech from playing?

I went through the process again, running the game everytime to see when the sound effects stop. They stop when you rename resource.aud to resource.sfx.

Offline troflip

Re: Voice acting in Space Quest V
« Reply #29 on: February 11, 2016, 11:20:35 PM »
Oops, yeah, I didn't even notice that, sorry. For some reason I thought I was hearing digital sfx still working when I renamed resource.aud to resource.sfx, but it looks like I was mixing them up with the midi sfx.

So it sounds like the SQ5 interpreter really doesn't support what you're trying to do.

In that case, it sounds like your options are:
- be ok with it only working in ScummVM (you can talk what you have right now and it appears to work), or
- switch to using the LSL6 interpreter, which does support speech

The SCI 1.1 template game is based on SQ5, but uses the LSL6 interpreter. So... it's possible to do this, but it wasn't trivial. You'll get to know SCI really well if you attempt this :-). Unfortunately I don't have time to help with this, but hopefully other forums members might be able to. There should be some threads buried in here somewhere about problems I ran into, and the solutions (often with great help from Lars, who works on the SCI part of the Scumm interpreter). Off the top of my head:
- some of the base classes (View, Prop, Actor, etc..) might need to have a property added here and there
- vocab 994 (I think?) needs to be the one from the LSL6 interpreter
- there's a version stamp that needs to be changed somewhere (was it in resource.map? I forget).
- the global variables may need to be move around a bit
« Last Edit: February 11, 2016, 11:27:24 PM by troflip »
Check out my website: http://icefallgames.com
Groundhog Day Competition


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

Page created in 0.034 seconds with 23 queries.