Game Development Community

FootstepLight[Tex]Sound repeating on .dif created w/ Constructor

by JoeMan · in Technical Issues · 03/05/2008 (1:31 pm) · 17 replies

I have created a couple structures with the Torque Constructor and have been successful at implementing them into the game world. However, when I use a FootLight[Tex]Sound and walk on the actual structure the sound get "stuck" on the structure and continually repeats until the game is shutdown or all sounds are stopped. Does anyone have any idea what would cause this to occur? Here are the AudioProfiles and AudioDescriptions that I am using which are straight out of the 3D Game Programming All-In-One SE book.

// Audio profiles for Player footsteps sounds

datablock AudioProfile( FootLightSoftSound )
{
	filename = "~/data/sound/footstep1.ogg";
	description = AudioClosest3d;
	preload = true;
};

datablock AudioProfile( FootLightHardSound )
{
	filename = "~/data/sound/footstep1.ogg";
	description = AudioClose3d;
	preload = true;
};

datablock AudioProfile( FootLightMetalSound )
{
	filename = "~/data/sound/footstep1.ogg";
	description = AudioClose3d;
	preload = true;
};

datablock AudioProfile( FootLightSnowSound )
{
	filename = "~/data/sound/footstep1.ogg";
	description = AudioClosest3d;
	preload = true;
};

datablock AudioProfile( FootLightShallowSplashSound )
{
	filename = "~/data/sound/footstep1.ogg";
	description = AudioClose3d;
	preload = true;
};

datablock AudioProfile( FootLightWadingSound )
{
	filename = "~/data/sound/footstep1.ogg";
	description = AudioClose3d;
	preload = true;
};

datablock AudioProfile( FootLightUnderwaterSound )
{
	filename = "~/data/sound/footstep1.ogg";
	description = AudioClosest3d;
	preload = true;
};

FootSoftSound = FootLightSoftSound;
FootHardSound = FootLightHardSound;
FootMetalSound = FootLightMetalSound;
FootSnowSound = FootLightSnowSound;
FootShallowSound = FootLightShallowSplashSound;
FootWadingSound = FootLightWadingSound;
FootUnderwaterSound = FootLightUnderwaterSound;

And these are the AudioDescriptions,

//3D Audio Descriptions

$SimAudioType = 0;

datablock AudioDescription( AudioClose3d )
{
	volume = 1.0;
	isLooping = false;
	is3D = true;
	ReferenceDistance = 10.0;
	MaxDistance = 60.0;
	type = $SimAudioType;
};

datablock AudioDescription( AudioClosest3d )
{
	volume = 1.0;
	isLooping = false;
	is3D = true;
	ReferenceDistance = 5.0;
	MaxDistance = 30.0;
	type = $SimAudioType;
};

And, the structures produced with Constructor are simply exported as .dif files and are created and positioned in-game with the Mission Creator. Any help with this will be wonderful and I thank all who spare the time to help! ;0)

About the author

Recent Threads


#1
03/05/2008 (1:38 pm)
I attempted to use a .wav in place of the .ogg file type, but the same thing occurs. :'-(
#2
03/05/2008 (3:28 pm)
Your audio profiles and descriptions look good to me, what about the syntax for material mapping?
#3
03/05/2008 (4:13 pm)
I'm not quite sure where to look for the material mapping yet, but even so would the material cause the sound to repeat like that? The sound just keeps adding up and adding up each time I take a step on an interior I have made with Constructor. So, it ends up sounding like an orchestra of footsteps all playing at positions I have walked on in or on an interior; trippy.
#4
03/05/2008 (4:32 pm)
Each texture that is used on an interior shape can have a property map that determines what sound (if any) is played when walking on that surface. You would find the propertymap.cs in the interiors directory. Since you haven't done any custom material mapping then that shouldn't affect you.

I had a similar problem in another engine that occurred with looping sounds that hung around in one location ad infinitum. But you audioDescriptions are showing that the sounds are not looping. I don't know....

Can you duplicate the problem with another interior?
#5
03/05/2008 (4:45 pm)
Yes, every interior that I have made causes the phenomena. That I know of, the prefabricated interiors and structure do not do this. I am going to check on that right now.
#6
03/05/2008 (4:48 pm)
Ok, I was wrong. Even the interiors like the landtower.dif that comes with the engine does the same thing. I am really confused now! X-p
#7
03/05/2008 (6:22 pm)
That's definitely not normal. I find that confusing myself. Have you made any kind of audio changes to the engine maybe? What about footstep sounds on the terrain?
#8
03/05/2008 (7:28 pm)
The footstep sound work perfect on the terrain. It is only when I walk on interiors. I have not made any changes to the audio in the engine. The only change I have made to the engine is to allow tracers on projectiles. This sound chaos was happening before the engine recompilation and is still occurring as you know by now.

Here is a look at my propertyMap.cs :

addMaterialMapping( "Floor_slate01" , "sound: 0" );
addMaterialMapping( "Floor_tile01"  , "sound: 1" );
addMaterialMapping( "FlrFiller3_01" , "sound: 2" );
addMaterialMapping( "FlrFiller3_02" , "sound: 3" );
addMaterialMapping( "FlrFiller3_03" , "sound: 1" );

If these first parameters to addMaterialMapping are textures/materials I do not recognize any of these. None are used on my interiors. Speaking of interiors, I just realized that I exported the things I've created into the structures folder and not the interiors folder. What kind of difference would this make? Is the propertyMap.cs generated by the engine, or are those just default textures that are put into this file? I think I recognize these texture name from some of the default texpacks in Constructor.
#9
03/05/2008 (8:20 pm)
Yeah those are some of the starter textures for Contructor and also the starter.fps interiors. The sound values are coded as to which kind of foot sound plays: hard, soft, metal, snow - not sure of order. Folder names vary from setup to setup, it's a personal choice.
#10
03/05/2008 (8:25 pm)
So, my guess is I can fill this file with my material names and just figure out the order (hard, soft, etc...) that the sounds are coded and that should be the profile that is used do to the assignments above. I guess that would be a good option to try seeing as I have no others right now. ;0)
#11
03/05/2008 (8:43 pm)
If you don't have the materialmapping script then the sound shouldn't play at all. There's some other problem with sound on some other level. Hardware or software I couldn't say.
#12
03/10/2008 (12:21 am)
@Michael,
If there is no property map assigning the sound, the sound will actually revert to default "0".

As far as the looping goes, I experienced the looping sound issue once on an old project and it seemed to be a server side issue... I don't remember what the programmers did to get rid of the issue unfortunately. :|
#13
03/10/2008 (6:03 pm)
Did you by any chance happen to upgrade your openAL dll for the game?
If so that could cause a whole lot of issues unless you reintegrate everything... Just a whim.
#14
03/10/2008 (7:03 pm)
Quote:@Michael,
If there is no property map assigning the sound, the sound will actually revert to default "0".
I'm glad you pointed that out, I should turn the sound up more often.

Is the footstep sound triggered from the model itself, or played through script? I had some problems with sound using the 3d-Game Programming All-In-One book (great book by the way!), but it was the old first edition which was using TGE 1.2 or possibly 1.3. If I remember correctly it mentioned this problem in the sound section of the book, but I haven't seen my copy in a while.
#15
03/11/2008 (2:39 am)
It's triggered from the foot hitting a certain part of the animation sequence.
Animation -> Script -> Audio Profile -> Audio Description... (Basically)

Mapping sounds to textures, do just that... they tell which sound to play when you move over a specific texture.
#16
03/11/2008 (9:34 am)
There was a script method used in the book to play footsteps instead of the animation trigger of the model. There was an issue with this, It's just been awhile and I don't remember how it was done.
#17
03/17/2008 (12:32 am)
I still had the problem when I submitted the final project for the class. Now, the funny thing is I downloaded some of the other students submitted games to check them out and when I walked on the interiors I had no problem; the "stuck" looping sound did occur. So, obviously it must be something in the code, correct? I used the OpenAL.dll that everyone else used in their project which is the one provided by the book's CD, which I am sure there is a new version of and maybe I should try. I will try the newest version of OpenAL and post the verdict.