Not logged inOpenClonk Forum
Up Topic Development / Scenario & Object Development / Move all sounds to Sound.ocg?
- - By Günther [de] Date 2011-10-28 00:44
Previously, sounds in the object definitions were kept in RAM while sounds from the Sound.ocg were loaded on-demand, but now everything is loaded on startup. Given that all sounds share a global namespace anyway, so we don't avoid any name collisions by keeping the sounds in the object files, I propose that we move all sound files that aren't scenario-specific to Sound.ocg.
Reply
Parent - By Clonkonaut [ie] Date 2011-10-28 07:53
+1
Reply
Parent - - By Newton [de] Date 2011-10-28 11:35
(meshes? and) materials also share a global namespace. I find it clear to keep sounds that are used for one object just as the model of one object in that object definition. That said, I am not heavily opposing your suggestion, I just think that how we do it now is also ok/slightly better.
Parent - - By Clonk-Karl [de] Date 2011-10-28 20:02

> (meshes? and) materials also share a global namespace.


Only material scripts do. Meshes are very much like Graphics.png (except for #480 *hide*).
Reply
Parent - By Ringwaul [ca] Date 2011-10-28 20:34

>Meshes are very much like Graphics.png (except for #480 *hide*).


:D
Reply
Parent - - By PeterW [gb] Date 2011-10-28 20:47 Edited 2011-10-28 20:50
There's also the argument that we might introduce a system to disambiguate the sounds or meshes in future.

Also, this makes it harder to completely remove a object definition - you always have to check for leftover sounds. And am I overlooking something, or won't this end up loading a lot of unnecessary sounds once we have multiple object packs? To say nothing about scenarios wanting to only load parts of an object pack or using SkipDefs.

I don't know. For things that are used by a lot of object definitions - yes, clearly. But otherwise, this doesn't really feel like an obviously good idea to me.
Parent - - By Günther [de] Date 2011-10-29 17:34

> There's also the argument that we might introduce a system to disambiguate the sounds or meshes in future.


I very much doubt that. It is far, far easier to just prefix the problematic sounds, so nobody will be annoyed enough to design and implement something more complicated.

> you always have to check for leftover sounds


You have to do that anyway, lest you break other objects which also use the sound that just happened to be in that particular folder.

> And am I overlooking something, or won't this end up loading a lot of unnecessary sounds once we have multiple object packs?


In that case we could put the sounds in the toplevel directory of that object pack. But maybe we will instead change to load every object at the start of the game to shorten the scenario load times? That actually sounds more plausible to me than the hypothetical "system to disambiguate" :-)
Reply
Parent - By PeterW [gb] Date 2011-10-29 18:22

> lest you break other objects which also use the sound that just happened to be in that particular folder.


In that case I'm all for having them in a more global folder. I'm talking about the (all-too-common) case that we have a sound that is actually very specific to one object.
Parent - By Caesar [de] Date 2011-10-28 12:31
+1
Besides, with that change the way the soundname-matching worked was altered, too. It's now a true wildcard match and you have to use a ? if you want to match a single number.
Up Topic Development / Scenario & Object Development / Move all sounds to Sound.ocg?

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill