Intermission Music System


#1

We have recently implemented an intermission music system for Tremulous 1.3. Basically what it does is selects a music track to play at intermission based on the outcome of the game, the team you are on, and includes the feature of supporting multiple sets of versions of those kinds of tracks that can be randomly selected by the server to add variety.

Additionally this system is designed to adapt to the addition of any new teams that a mod might add, besides aliens and humans (third and/or fourth and/or fifth and/or nth team anyone ? :slight_smile: ). If a new team is added to the team_t structure in bg_public.h, and in the bg_teamList array in bg_misc.c (note that the order of the teams in that array has to match the order in team_t). then this intermission music system would be ready to go looking for the team specific tracks in sound/teams/nameofthenewteamhere/ . If any or all of those tracks are missing, then the system plays the corresponding default generic intermission music track.

Note that you can personally enable and disable the intermission music for your client by setting the cvar cg_intermissionMusic .

There are three general types of outcomes for a match:

  • Stalemate: Happens when the time limit is reached.

  • Evacutation: Happens when a match ends in a draw

  • Win: Happens when one of the teams wins. In such a situation, a given team that plays either wins, or loses.

So each team that plays, would have 4 different kinds of intermission music tracks in their specific sound/teams/ folder (for the current teams that play, those specific folders would be sound/teams/human/ and sound/teams/alien/):

  • intermission_time0
  • intermission_evac0
  • intermission_win0
  • intermission_loss0

Spectators would only have two kinds of spectator specific intermission music tracks, intermission_time 0 and intermission_evac0, both located in sound/teams/spectator/ . If a match ends with a win, then one of the winning team’s specific intermission_win tracks would be played for the spectators.

Note that each of those end with the number ‘0’, that number indicates which set version the given track is a member of. As mentioned, support for multiple sets of the tracks is in place to add more variety, so that you don’t always here the same specific tracks under the same circumstances. The first set ends with ‘0’, the second set would end with ‘1’, the third set would end with ‘2’ and so on.

Currently I have the system configured only for a single set (to reduce the warning spam of files not being found), but that can easily be adjusted by increasing the value of MAX_INTERMISSION_SOUND_SETS to the desired number of sets. If the system is configured for multiple sets, then the server randomly selects which set is used at the time the match ends. I think that 3 sets would be a good way to go for the intermission music. (Side note, I would like to see 5 versions of the end of warmup music)

The new client can support .wav and .opus audio files (there are rumors that there is also support for .ogg, but I’m not sure since we had some initial difficulty getting .ogg files to work when trying them with this system). When it comes to the custom team specific intermission music tracks, any of the supported audio file types can be dropped in. However, for this use, it would be preferable to use a compressed type like .opus instead of the “raw” type .wav since with the larger number of required files, the total size requirement becomes crazy large for .pk3 distribution considerations.

With that said, the older clients (1.1 and gpp clients) could only support .wav files, so for this music system, we are including 4 “team generic” .wav default tracks so that the old clients can still hear something in place of the custom team specific tracks. Those default tracks would also be played if any of the “custom tracks” are missing, which may happen at least initially if a new team is added.

The paths of the 4 default tracks are as follows:

  • sound/misc/intermission_default_evac.wav
  • sound/misc/intermission_default_time.wav
  • sound/misc/intermission_default_loss.wav
  • sound/misc/intermission_default_win.wav

The initial commit for this system can be found here:

The subsequent commit is also important as it cleans up the parsing aspect and makes it more efficient, and fixes a crash that clients would experience every time a team wins (lol):

Here is the current .pk3 file we are using with placeholders provided by @AutumnLegends (note that the quality of at least some of the included tracks might be messed up from the conversion processes that were used, the original versions of those tracks that @AutumnLegends made sounded awesome, and I will update the link to a better quality package once available).

http://dl.grangerhub.com/base/zzz_AutumnLegends_sounds-0006.pk3

@AutumnLegends is in process of making new complete “final” track sets for this system.

This system is now available on the Unitremia and GrangerLab game servers.


#2

I simplified the system a little bit. Now when one team wins, everyone hears the winning team’s winnder music. So there would no longer be team specific loss music. So the spectators would still have their own time limit and evacuation music, and each of the other teams would have their own win, time limit, and evacuation music. Again, there is support for variations of each music type on each team, so we could have multiple alien win tracks for example.

Another thing that was changed is there is no longer .wav default versions of the intermission music provided, because it was taking up too much space, so all of the intermission music is in the .ogg format.


Tremulous Music Suggestions