Dynamic In-Game Music Experiment

For quite some time now I’ve been fascinated with dynamically changing in-game music. One brilliant example of a dynamic music system is Lucasarts’ IMUSE (part of SCUMM) that was used in their adventure games. Other, fresher, examples are apparently Rez and Lumines. I can’t say for sure, though – I’ve never played either of them. I know, I suck. I just don’t play that many new games if they’re not sim or strategy games! And barely even then.

Anyway, I have this game idea, and I’d love to make music a more integral part of the gameplay. One way would be to feature sound effects that act like instruments in the music, and make sure that they play in the correct places. But that wouldn’t really fit in well with the current idea, so I thought about dynamically changing background music instead. A common way to do this is to have context-sensitive music in the game - for example, increase intensity when there’s danger nearby. That’s is a way of using music to convey an emotional message; give feedback that will increase the intensity of the current emotion. Personally, I’m more interesting in using dynamic music for variation and to convey information instead – I intend to not weight in any emotional content into the variations.

I put together a quick test to see if this would work practically:

http://www.cynicalstuff.com/files/CruxTest.zip
(1 MB, 800×600 windowed application that plays music according to the mouse position. See below for more information)

Here’s a screenshot of how it looks in action. Impressive, ne?

http://www.cynicalstuff.com/files/cruxtest.jpg

This is the basic idea:

I have nine different sound clips:

  • Background music (piano)
  • Drums (two intensities)
  • Bass (two intensities)
  • Oboe (two intensities)
  • Synthish dooh-sound (two intensities)

There are five clips playing at the same time. The background never changes, but if you look at the screenshot you’ll note that there are floating-point values for axis 1 and 2. This determines the intensity and volume of the other sound clips.

Axis 1:

This is the x-axis, and the rythm axis. To the far left you have low-intensity drums but high-intensity bass, and the bass are the loudest. The reverse is true to the far right.

Axis 2:

This is the y-axis, and the melody axis. In the upper part you have the synthish dooh melody, and in the bottom, you have the oboe melody. If the dooh or oboe is at low intensity, they simply play notes to follow the chords instead of the melody.

The music loops every 10 seconds, and the clip types are updated then. It’s a relatively long time, but I thought that it’d be too annoying with rapid changes. If you wish to speed things up and restart the loop with the current axis settings, simply press the mouse button.

Now, I think that this works pretty well. Of course, 10 second clips won’t do! More variation in the music is definitely necessary, but this illustrates the basic dynamics idea. If the game has two clearly visible attributes that change to and fro over time, this will hopefully give both visual and audial feedback. My hope is that the player will become more immersed with a system like this; especially if the four corners of the music are even more diverse. For example, there could be more separated themes to the different corners: woodwind/guitar/bass/drums. Or even flute/distorted guitar/techno drums/”real” drums, that refer to four different visual themes in the game. A kind of “natural versus electronical” battle, where the goal is to make them all co-exist in harmony; to find the balancing point. Thus the name Crux for this project.

I think that this could work pretty well. But am I barking up the wrong tree here? Is there some more common method that’s normally used? Am I re-inventing the wheel completely?

4 Responses to “Dynamic In-Game Music Experiment”

  1. mister slim Says:

    You should definitely take a look at Donkey Kong: Jungle Beat. It’s a 2D platformer using the DK Bongos as the controller. This limits it to basically four inputs: the left drum (move left), the right drum (move right), both drums at once (jump), and clapping (which does an attack or various contextual actions). Since the inputs are musical anyway, it has a great starting point for a dynamic soundtrack. In addition to tying the music into the player inputs, it uses the combo system to elaborate on the music, bringing in more elements as the player plays better and achieves more complex actions successfully.

  2. soniCron Says:

    Interesting experiment! :)

    I’ve been playing Zelda: The Wind Waker lately, and the musical integration is spot-on. Not only does the soundtrack respond to the action (or lack thereof,) it also plays musical hits when Link hits enemies, increasing intensity depending on the enemy’s health. It’s a subtly marvelous implimentation of interactive music that’s well worth a look.

    Of ancillary interest, I wrote an article the other day regarding the importance of music in games: http://sonicron.solaristudios.com/2006/11/18/why-music-is-critical/

  3. Cynical Stuff » Blog Archive » Prototyping, Software 3D Algorithms and Sheeplings v1.0 Says:

    [...] while ago I made an experiment with dynamic in-game music that I intended to use in a game called Crux. Recently I made a prototype of the idea, and…it [...]

  4. Doh Says:

    The game Phantasy Star Online had dynamic music. Basically, each stage had 2 musics, and multiples “fade ins” sections to switch from track 1 to 2 or vice-versa.

    I remember fondly games like Wing Commander, Tie Fighter, Dune 2 where the music was dynamically changing.

    I constantly poke the sound guys at work about dynamic music, because I feel that it is too often overlooked in new games.

Leave a Reply

Copyright © 2009 KarjaSoft