Music and sounds

From Unvanquished
Revision as of 21:25, 16 October 2017 by Illwieckz (Talk | contribs) (CC-Sampling Plus is not suitable for a game, we are not sampling them but redistributing them unmodified, also even CC discourage this license which is a license mistake)

Jump to: navigation, search




The following licenses are suitable for music and sounds:

Configuration files


There are 14 animations per buildable type: construct1, construct2, idle1, idle2, idle3, attack1, attack2, spawn1, spawn2, pain1, pain2, destroy1, destroy2, and destroyed. Each buildable type has a sound configuration file, located at sound/buildables/<buildable_type>/sound.cfg, that describes 2 properties for each buildable animation:

  • whether the buildable animation has an associated sound, and
  • whether the sound is to be played in a loop.

Such a file should contain a 1 for a yes answer and a 0 for a no answer, for the above 2 questions, in the given order, and for each buildable animation, in the above given order. Technically, this means that the file should contain 28 integers (2 per animation). However, by convention, 1 line is used for each animation, and comments are added for guidance about which animation a pair of numbers refers to.

So each line in a buildable sound configuration file is formatted as follows:

<has_sound> <loop> //<filename>

An example of a full buildable sound configuration file is:

1 0 //construct1.wav
0 0 //construct2.wav
1 1 //idle1.wav
0 0 //idle2.wav
0 0 //idle3.wav
0 0 //attack1.wav
0 0 //attack2.wav
0 0 //spawn1.wav
0 0 //spawn2.wav
0 0 //pain1.wav
0 0 //pain2.wav
1 0 //destroy1.wav
1 0 //destroy2.wav
0 0 //destroyed.wav

Again, the comments only help human readers, and are indifferent to the game (do not reorder the lines!).

Sound filenames

The structure cg_customSoundNames in src/gamelogic/gpp/src/cgame/cg_players.c contains a list of some sounds.