I’ve been plowing through music implementation stuff this week. I made a bunch of tweaks to the playback system so we can smoothly and immediately bring new clips in in the middle of a section and everything stays nicely in sync.
I’ve started linking music intensity changes up to in-game events. It’s really easy for us to tie intensity changes to pretty much anything. Intensity will be bumped up slightly if you’ve got a weapon equipped, or there’s a helicopter flying around. It’ll get a bigger bump if a bullet flies by your head, and an even bigger bump if you take damage.
If nothing has happened during a given section of music, the intensity will drop a bit at the end of each section, so we get a nice natural sounding migration back to zero intensity.
I spent some time working on a UI to set up and arrange our songs and did a few other little things to make this nicer to work with in Unity. Each of these little blocks is a clip of music. The sliders in the boxes define the intensity range that a clip can play at in a certain section of the song. The green/blue colored boxes are clips that will play at the current intensity level, and the column with the green boxes is the currently playing section. Previously this data was all in a huge list of nested dropdowns and was a total pain in the ass to manage, and the visual indication of what’s playing back has helped quite a lot already too.
All that’s left to do on this now is:
- Set up a system to decide which songs to play and when. This will work similarly to the ambience system, we’ll change songs depending on what part of the map you’re in, the time of day, the weather, etc. I’d eventually like all the monuments to have their own theme song as well.
- Finish tying intensity changes to in game events
- Chop up the songs we’ve got now and set them up
- Write more music!
I’m aiming to get this stuff included in next week’s update, but it’ll be disabled by default with a convar for the first week or two so I can test it in a live gameplay environment and spend a little bit of time fine tuning everything before we launch it for realsies.