After looking at Dystopia's cache files with the "Game Extractor" tool from that wiki page, I can't help but wonder why they're so messy compared to the CS:S/DOD/etc counterparts.
Perhaps creating these caches manually could give better performance? On 12/4/05, Evan Braa-Heidner <[EMAIL PROTECTED]> wrote: > the sound cache is for preloading the first second of every sound so that > they play while loading > > http://developer.valvesoftware.com/wiki/Soundcache > > it is very buggy and does not always work > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of Garry Newman > Sent: Saturday, December 03, 2005 4:46 AM > To: [email protected] > Subject: [hlcoders] Soundcache.. what is it for? > > > To cache sounds presumably. > > If I search my entire Steam folder for ".cache" I get an interesting > insight. > > _sharedprecache.cache: > > CSS: ~6 mb > HL2MP: ~19mb > HL2: ~19mb > LC: ~8mb > dystopia: 1kb > gmod: 1kb > smod: 1kb > > I'm assuming that sharedprecache is exactly what it says, a shared precache. > > Now if we look at individual maps > > Dystopia's map has a 7mb soundcache > All of GMod's maps have ~18mb soundcaches > SMod's maps have ~19mb soundcaches > Non mods have caches generally under 500k > > The map's soundcaches appear to be created on the first run of the > map, then saved on a succesful exit. This can take quite a long time > the first time that you run the map. > > So I added this hack in DLLInit.. > > > if ( filesystem->Size( "maps/soundcache/_sharedprecache.cache", "MOD" > ) < 1000000 ) > { > filesystem->RemoveFile( > "maps/soundcache/_sharedprecache.cache", "MOD" ); > if ( filesystem->FileExists( > "maps/soundcache/_sharedprecache.cache", "GAME" ) ) > { > if ( filesystem->Size( > "maps/soundcache/_sharedprecache.cache", > "GAME" ) > 1000000 ) > { > char To[MAX_PATH]; > Q_snprintf( To, MAX_PATH, > "%s/maps/soundcache/_sharedprecache.cache", g_GMODFolder ); > Msg( "Copying _sharedprecache.cache..\n" ); > engine->CopyFile( > "maps/soundcache/_sharedprecache.cache", To ); > } > } > } > > This copies the _sharedprecache.cache file if it's over a certain size > and the current file is under a certain size. > > When running GMod with this I found that the maps loaded a ton faster > on their first load. And the cache file generated were averaging under > 500kb. > > So, my question is what are we doing wrong? > > Should we be shipping a _sharedprecache file with our mods or are we > not shipping files to properly generate one? > > (Thanks to TomEdwards for the heads up on this) > > ~garry > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, > please visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders > > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, please > visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders > > _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders

