Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: RetroJay on Thu 17/01/2013 05:14:00

Title: Footstep sounds not scaling with character. [SOLVED].
Post by: RetroJay on Thu 17/01/2013 05:14:00
Hi all.

I need a little help.

I seem to be having broblems with 'Character scaling'.
All of my Character sprites have a footstep sound within their views, at the correct frames.
A few rooms have Walkable areas where the character walks away from the camera, in to the distance.
Although the character scaling works, he gets smaller, the footstep sounds stay at the same volume.

I have searched and read the manual, as usual, but am at a loss.
I have gone over and over this and everything is set to use 'continuous scaling'.

Please. have I missed something here?

Many thanks.
Jay.
Title: Re: Footstep sounds not scaling with character.
Post by: Armageddon on Thu 17/01/2013 05:43:49
I don't see why they would get quieter if we're hearing what the player character is hearing.
Title: Re: Footstep sounds not scaling with character.
Post by: RetroJay on Thu 17/01/2013 05:53:11
Hi Armageddon.

The character footstep sounds got quieter as he walked away in 2.72 so why not now?

From the manual:
QuoteScaleVolume property
bool Character.ScaleVolume

Gets/sets whether the character's volume is adjusted in line with his current scaling level. This allows you to modify the "Adjust volume with scaling" option from the editor.
By default, this is false. If you set it to true, then any frame-linked sounds for the character (for example, footstep sounds) will have their volume automatically adjusted in line with the character's scaling level. At the normal 100% zoom level the sounds will be played at normal volume, but will then get quieter and louder as appropriate in scaled walkable areas.

Example:

cEgo.ScaleVolume = true;

will mean that EGO's footstep sounds are adjusted in line with his scaling

I have tried everything I can think of and can't make it work.

Thanks.
Jay.
Title: Re: Footstep sounds not scaling with character.
Post by: Khris on Thu 17/01/2013 11:51:18
I tested this in my default test game and set the MinScaling to 10. It worked on the spot; the volume got noticeably lower.
Then I set MinScaling to 60 and the change was still there, although much more subtle. Add the fact that the sound's balance is changed as the character moves on the x-axis and it can be hard to notice at all. But it definitely works just fine in 3.2.1.
Title: Re: Footstep sounds not scaling with character.
Post by: RetroJay on Thu 17/01/2013 22:02:35
Hi Khris.

I am using AGS 3.2.1... Finally.
I'm glad it works for you cos It sure as hell don't work for me. ???
I tried what you did by setting the MinScaling to 10 but there is no change.
The character gets smaller as he walks away but the sound will not scale with him.

Could it be the format of my footstep audio clip? It is a wav file.

Any help to resolve this would be much appreciated.
Thanks.
Jay.
Title: Re: Footstep sounds not scaling with character.
Post by: Khris on Thu 17/01/2013 22:44:34
I recorded a wav file, works fine for me.
Could you upload your file so i can check it?

The only other thing I can think of is double-checking that ScaleVolume is in fact enabled.
Try adding this to your test room's script:
Code (ags) Select
void on_key_press(eKeyCode k) {
  if (player.ScaleVolume) Display("It's enabled.");
  else Display("It got disabled at some point.");
}

and press any key during the game.
Title: Re: Footstep sounds not scaling with character.
Post by: RetroJay on Thu 17/01/2013 23:15:54
I added your script to my room and it says that it is enabled.

I would love to upload my audio clip to your good self... How do I do that? :-[

Jay.
Title: Re: Footstep sounds not scaling with character.
Post by: Khris on Thu 17/01/2013 23:21:45
Try uploading it here:
http://bluecup.suitorgames.com/
(provided by TheSuitor for AGS related stuff)
Title: Re: Footstep sounds not scaling with character.
Post by: RetroJay on Thu 17/01/2013 23:36:11
Uh Hu. I see it all now... some of it.

I think that has worked. It is 'Footstep rar'.
I could only do it like that it wouldn't accept just the file on it's own.

Many thanks Khris.
Jay.
Title: Re: Footstep sounds not scaling with character.
Post by: Khris on Fri 18/01/2013 00:24:18
I imported your file and set it as sound in the view editor. And again, it gets quieter as the character gets smaller.
This is really puzzling, I have no idea why it doesn't work for you.

Maybe there's something weird going on with your audio setup?
I have uploaded my compiled test game, if you want to try it: http://bluecup.suitorgames.com/FootstepTest.zip
Title: Re: Footstep sounds not scaling with character.
Post by: RetroJay on Fri 18/01/2013 01:10:09
Hi Khris.

I have tried your test room and it works just fine.
I have no idea as to why it won't work for my game.

Only one other thing I can think of is, and I don't see why this should matter.
I am creating my game with AGS 3.2.1 on a Windows XP machine at the moment, until I get my Win7 machine back from repair.

I do seem to be having sound issues with 3.2.1.
You helped me only a while back with 'Ambient sound' problems not playing after loading a game, which you cured for me.

I know that this will upset people... but I still like 2.72 better. I am truly Retro. ;)

Thank you for all your help, Khris. I really appreciate it.
I shall just have to keep playing and see if I can solve this.

Jay.

P.s. Maybe I could Up-load what I have to you and see if you can find anything wrong, if you don't mind?
Title: Re: Footstep sounds not scaling with character.
Post by: Khris on Fri 18/01/2013 09:48:48
Sure, go ahead, I'm curious why it doesn't work for you.
Title: Re: Footstep sounds not scaling with character.
Post by: RetroJay on Fri 18/01/2013 19:06:01
Hi Khris.

I have up-loaded the bare bones of my test.
Also I have brought the MinScaling down to zero in room two, Walkable area 2, just to emphasize the problem.

I hope you can find what is amiss here.

Many thanks.
Jay.
Title: Re: Footstep sounds not scaling with character.
Post by: Khris on Fri 18/01/2013 19:22:36
Hi Jay,

I don't know what to tell you...
Before looking at anything in AGSEdit, I gave the game a test run, and the footsteps get quiet in room 2 just fine.

Do you have another system you can try the game on?

Edit: what happens if you play an audio file and decrease the channels volume? Does that work?
Title: Re: Footstep sounds not scaling with character.
Post by: Slasher on Fri 18/01/2013 19:22:58
Downloaded test

settings DirectDraw
No filters
WIN XP

Sounds working ok, bit rough but ok.

slasher

Title: Re: Footstep sounds not scaling with character.
Post by: RetroJay on Fri 18/01/2013 19:53:30
Hi Khris.

I am totaly baffled by this.
As far as I know all the audio setup on this comp is fine but I will check it out.
I will try my test on my win7 comp, when I can and let you know what happens.

Thank you for your time, Khris.
Jay.

Hi Slasher.

Thanks for taking a look.
It's only a test. I have other sounds better than that one for his footsteps.
Also the backgrounds were just slung together for test purposes.

Many thanks.
Jay.
Title: Re: Footstep sounds not scaling with character.
Post by: RetroJay on Fri 18/01/2013 22:02:53
This is cranky.

I instaled AGS 3.2.1 on a win7 comp, put my test game to it, and tested it.
Exactly the same thing happens. >:(

The footstep sounds stay at the same volume.
Surely if the player characters MinScaling is set to zero then the volume of footsteps should be inaudible.

This is driving me around the bend.

Jay.
Title: Re: Footstep sounds not scaling with character.
Post by: Slasher on Fri 18/01/2013 23:59:00
Try setting minimum scale to say 10 and see what happens?
Title: Re: Footstep sounds not scaling with character.
Post by: RetroJay on Sat 19/01/2013 03:05:50
It doesn't work.

I have tried everything... and... It doesn't work.
I used the same effect with 2.72 on the first part of my game and had no problems.

So far I have had nothing but grief with 3.2.1.
I am NOT impressed with it, not one little bit. :(

Jay.
Title: Re: Footstep sounds not scaling with character.
Post by: Slasher on Sat 19/01/2013 07:54:33
If the sound refuses to lower with scale then it could be a 'Windows' problem.

Have you tried compiling and then altering some of the setup options before running game?

Apart from that I don't know why sound is not lowering with scale.

AGS 321 is a great engine responsible for many a great game.

Title: Re: Footstep sounds not scaling with character.
Post by: Khris on Sat 19/01/2013 09:39:52
This is really weird.

What happens if you do something like:
Code (ags) Select
  aFootstep.Play();
  Wait(40);
  AudioChannel*ac = aFootStep.Play();
  ac.Volume = 30;


Does that work?

(Also, if you're unhappy with the countless improvements and bugfixes and one weird bad thing we haven't fixed yet, just go back to 2.72. ;))
Title: Re: Footstep sounds not scaling with character.
Post by: RetroJay on Sun 20/01/2013 07:58:24
Hi Khris and Slasher.

Sorry.
I don't have a problem with 3.2.1.
I like what has been done with our beloved engine.
Call it 'Venting my frustrations' if you like.

Right, Khris.
The piece of script you gave me plays the footstep sound once, then a pause, then again but much quieter, which I assume is a good thing as it shows that the volume works.

The test that you uploaded for me worked flawlessly.
Also I was impressed as to how you made the sound pan from left to right and back again, depending on which side of the screen the character was on, very clever.

Would you be able to upload an editable version so I can view what you have done to make it all work please.

Many thanks.
Jay.
Title: Re: Footstep sounds not scaling with character.
Post by: Khris on Sun 20/01/2013 14:06:50
The panning is done by AGS, and all I did was assign the footstep sound to two frames of each loop, put a walkable area with min and max scaling in a room and walk.
That's it, so I could upload the source code, but there's no point; I didn't use any code except "player.ScaleVolume = true;"

Now that we've also established that you don't get automatic panning in your game, could you start a clean default game in 3.21 and test the footsteps again?
I'm guessing you're editing a game you've started in 2.72 and I'm wondering if this is the reason for your audio not doing what it's supposed to. Since my game works fine on your system, it has to be your game files that cause it.
Title: Re: Footstep sounds not scaling with character.
Post by: RetroJay on Mon 21/01/2013 14:46:11
Hi Khris.

Tis me again. (I can already hear you groan.)

I have created a new test using 3.2.1 and the default template, on three different computers,
An XP machine, a Win7 machine and a Vista machine.

Surprise... Surprise the volume scaling on the footsteps or the panning doesn't work on any of them.
I have uploaded my new test, called 'Pixelated Little Pillock' for you to try, if you would be so kind.

Also, I started making this part of my game with 3.2.1. I didn't start it with 2.72.

Many Many Thanks.
Jay.
Title: Re: Footstep sounds not scaling with character.
Post by: Khris on Mon 21/01/2013 16:57:12
Just like with your other test game, I compiled and ran it: panning and scaling of the footsteps works just fine.

Just to recap: when you ran the game I uploaded, it worked, right? But whenever you create the game yourself, it doesn't work?
I'm at a loss here, sorry.
Title: Re: Footstep sounds not scaling with character.
Post by: RetroJay on Tue 22/01/2013 02:04:32
Hi again, Khris.

1. Yes. The game you uploaded worked. (I wish to hell that I could make my game work.)
2. Yes. That's right. Whenever I create my game it doesn't work.

I have taken a while getting back to you cos I just got back from my mates house.
He has many computers and my game does not work on them either, XP, Win7, Vista, Win8 and ones before. (He works all day with comps.)

Khris.
Are you using some sort of 'Plugin' or 'Module' or a Beta version of AGS 3.2.1, that I am not aware of?
I downloaded my version of 3.2.1 from the AGS tab on the AGS website.
When I hover my mouse over the downloaded file it says 3.2.1.0.

If you still can't help, I will admit defeat with this.

Thanks for your help, Khris.
Jay.
Title: Re: Footstep sounds not scaling with character.
Post by: Khris on Tue 22/01/2013 09:02:54
Of course, that's the solution. So obvious in hindsight.
Since Character.ScaleVolume is part of the official version of AGS 3.21, but flat-out refuses to work, I'd never have guessed that it's a feature of the altered engine I'm using.

Which is Alan v. Drake's Draconion Edition:
Here's the thread: http://www.adventuregamestudio.co.uk/forums/index.php?topic=44502.0

Sorry for wasting both our time :(
Title: Re: Footstep sounds not scaling with character.
Post by: RetroJay on Tue 22/01/2013 21:45:42
Hi Khris.

No worries.
I'm glad we got there in the end. :)

Sound is working fine, now.

Thanks for all of your help.
Jay.

Title: Re: Footstep sounds not scaling with character.
Post by: Slasher on Sun 27/01/2013 09:40:35
Quote from: Khris on Tue 22/01/2013 09:02:54
Of course, that's the solution. So obvious in hindsight.
Since Character.ScaleVolume is part of the official version of AGS 3.21, but flat-out refuses to work, I'd never have guessed that it's a feature of the altered engine I'm using.

Which is Alan v. Drake's Draconion Edition:
Here's the thread: http://www.adventuregamestudio.co.uk/forums/index.php?topic=44502.0

Sorry for wasting both our time :(

Well, Character.ScaleVolume (3.2.1) is defaulted to false. It seems you have to set it to true.

I would have thought it would be defaulted as true.

As you say, perhaps it's not functioning properly  :-






Title: Re: Footstep sounds not scaling with character. [SOLVED].
Post by: Khris on Mon 28/01/2013 00:31:56
I specifically said that I set it to true in my code when I tested it.
Also, in the engine's thread I linked to in the post you quoted, one of the listed features is: "AdjustVolumeWithScaling now works for real;"