Jump to content
Sign in to follow this  
nikiller

Path and performances

Recommended Posts

hi,

I wonder if the path, influence performance of an addon? Is the game is slower when it has to manage longer path?

let me explain what I mean.

Which path is the most performance friendly?

thi sone:

	class nj_m_voice_death29
{
	name = "nj m voice death 29";
	sound[] = {\nj_zombies\sounds\zombies\voice\male\death\m_death29.ogg, db+0, 1.0};
	titles[]={};
};

or this one:

	class nj_m_voice_death29
{
	name = "nj m voice death 29";
	sound[] = {\nj_zombies\sounds\m_death29.ogg, db+0, 1.0};
	titles[]={};
};

I have a lot sounds for my addon and for a question of organisation I had to put them in different folders, but now I wonder if it doesn't have an impact on the addon performance.

Thx.

cya.

Nikiller.

Share this post


Link to post
Share on other sites

Shorter paths are always better (though you won't notice much if any improvement in performance), within limits, as having one folder cluttered with every kind of file will make things confusing to work with for the addonmaker once you get several dozen files (harder to find files, more difficult version control etc). One level of subfolders is preferable (\nj_zombies\textures, \nj_zombies\sounds, \nj_zombies\config for example)

\male\ and \death are both redundant, as the actual files themselves also contain this information "m" and "death"

Edited by JdB

Share this post


Link to post
Share on other sites
I wonder if the path, influence performance of an addon? Is the game is slower when it has to manage longer path?

Whatever time it takes to lookup the correct file, the cost from longer path names is dwarved by the time it takes to load the sound file and the actual playing which lasts for hundreds/thousands of frames compared to the lookup which happens only at one frame.

So: Don't worry about the path length/complexity.

Share this post


Link to post
Share on other sites

hi,

I have no evidence to offer, but would think that any difference it does make would be more than offset by converting the sounds to wss rather than ogg. (Here's the closest I can find to an explanation).

The general rule that I subscribe to is that any sound to be used once in mission (eg. music or speech) is better in ogg for filesize reasons. Sounds played more than once (gunshots, death screams, movement, etc) are best as wss.

I read that wss or even wav have better quality and are better managed by the game because it doesn't have to convert the sound. I also noticed that the hitsound in config is played only for the server when it's in ogg but it's played for client+server when converted in wav or wss (it took me a long time to figure out thanks BAS config :)). But a wav or a wss it 10x bigger than ogg then if you have 20Mo of ogg it means 200Mo in wss and I want to keep the addon size smaller as possible. Moreover, I made .lip files and it doesn't work with wav or wss.

Futhermore, I try to avoid compressing things when creating the pbo.

Yes I don't compress anything when I create the pbo aswell.

Shorter paths are always better (though you won't notice much if any improvement in performance), within limits, as having one folder cluttered with every kind of file will make things confusing to work with for the addonmaker once you get several dozen files (harder to find files, more difficult version control etc). One level of subfolders is preferable (\nj_zombies\textures, \nj_zombies\sounds, \nj_zombies\config for example)

Rgr that I will short my path and keep one level of subfolder.

\male\ and \death are both redundant, as the actual files themselves also contain this information "m" and "death"

Yes you're right those info are redudant and useless I'll correct that.

thx guys.

cya.

Nikiller.

Edited by Nikiller

Share this post


Link to post
Share on other sites

I remember having read often that for OFP :

-wav is a performance killer format.

-wss is the best choice for short sounds like gunfire by example.

-ogg should be kept to longer sounds like music or vocal dialogues.

Is this all true for modern soundcard hardware, i can't say, but that is what i always try to apply when using sounds.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×