Blog // 08.07.08
Ben Against The Music (Part II)

There are about as many ways to solve this problem as there are games.  The most obvious is to loop a piece of music until it needs to change, but that’s such a brain-dead (yet woefully overused) solution that I have actually developed a specially-mutated genetic aversion to loops in any form.  Another common solution is to have several synchronized tracks that can fade in and out based on what’s happening in a level, but for us there were two problems with that approach.  For one thing, those synchronized tracks usually loop, which is unacceptable to my very core.  Secondly, I didn’t want to have any fades in the game.  Even in pop songs, my most despised convention is the fade out.  It’s a total cop-out, a complete head-in-the-sand denial of the problem of how to finish a song.

So our solution is twofold.  First we avoid the loop issue by building our music engine around the idea of a gradual accretion of related cells chosen at randomly, sometimes played intermittently, an additive behavior that continues as long as needed.  Each cell might be analogous to a drum loop, but of course it isn’t, since it doesn’t loop!  We can have several layers of this kind of thing going on at the same time, which increases the combinatorial possibilities exponentially.  And we can stop them on a dime without the need for a fade, instead, we just tell the engine not to play any more cells.  This turns music into a kind of goo that we can drape over any emergent dramatic circumstance the player tries to throw our way.  By creating the music from these building blocks, we ensure that the music has no pre-rendered, burned-in emotional trajectory, the way many game soundtracks do (with good reason: the hallowed precepts of composition typically instill the idea that this is a good thing in composers).  In other words, we’ve taken the built-in drama out of the music, so it is then free to respond to the real-time drama of the game.

So now I’m in the throes of hooking up our various sets of music, these little musical Mindstorms, to respond to all the cues coming from the AI, to make sure we handle every possibility with taste, flair, and sheer rock.  A few months ago, we already tackled the huge task of figuring out the ideal mapping of these AI events to musical textures, and now it’s down to the relative tedium of applying the same mapping to different groups of cells, to provide for variations in mood as you progress through the game’s maps, ensuring consistency.  That said, there are times as I’m testing this stuff when I just kind of bliss out to the notion that the game is surprisingly me with new configurations of sound that I hadn’t forseen, but are nonetheless quite delightful.

Maybe it seems like I’m making too big a deal out of our music system’s flexibility, but really, it’s a very important consideration for a game like EndWar.  We don’t have all the little set pieces and cut scenes endemic to FPS’s or RPG’s; the drama really is yours as you play, so it’s a great challenge (and an honor, I might add), for us to create your customized soundtrack every time you play.  We hope you enjoy it.

Photo: ben pt. 2 courtesy of Yang Ge