Game Development Community

Sound and texture problem

by Ian (Fluxtah) Warwick · in Torque Game Engine Advanced · 05/07/2007 (10:29 am) · 4 replies

Hi,

Wondering if anyone has experienced this, appologies if this has been said before:

When launching the demo, pressing F11 then File -> New to create a new mission.

Drop a crossbow + ammo then save the mission.

Hit escape to exit the mission, then I reload the mission.

Now when I pick up the crossbow and ammo and start firing the sound is all mixed up, the explosion sound is in place of the whoosh sound when I fire a bolt, also there is some sound clicking happening, and also the footstep sounds have gone.

If it doesnt happen for you then try to exit the mission (Escape) and reload it.

Also, so I can load my mission quickly I have replaced a line in loadFeatureMission() function of demo/client/init.cs:

createServer("SinglePlayer", "demo/data/missions/features.mis");

so it loads my own mission:

createServer("SinglePlayer", "demo/data/missions/anotherMission.mis");


Does this happen for you? If anyone has fixed this problem it would great to know :)

#1
05/07/2007 (10:30 am)
Oops, also when I pick up the crossbow the texture is missing in the view model, its stamped with an orange NO TEXTURE.
#2
05/07/2007 (10:46 am)
The sound problem is a common bug that happens occasionally in Torque. I've never quite tracked down the precise cause myself. If you restart Torque the problem goes away, I suspect some audiohandles may not be getting destroyed or reloaded properly.

The error texture is because you don't have a material definition for it. If a texture doesn't have a material definition associated with it you'll get the orange error texture.
#3
05/07/2007 (10:56 am)
Coo, thanks for the response, I seem to be able to replicate the sound problem each time, and it concerns me this could happen when a server is cycling missions that all clients will start recieving this bug.

Thanks for the texture problem answer, that makes sense, however I just imported a model as a StaticShape into torque and that does not have a material definitition yet is able to display its texture.

EDIT: I think I got the material thing, I guess this is new in TGEA because of the shader integration, I am not quite sure I got it right but I added a material.cs to the demo/data/shapes/crossbow folder and put this in:

new Material(CrossBowMaterial)
{
baseTex[0] = "~/data/shapes/crossbow/crossbow";
};

What I dont understand is how it knows to link the crossbow.dts model to this material, also considering I gave it my own name of CrossBowMaterial.. hmmm :) I best do more learning methinks :P
#4
05/07/2007 (2:42 pm)
Eep, I realise now that the sound problem does not occur when running a debug build :)