Devlog 13 - Music and Level Design

Published: September 10th, 2021

Today I wanted to write a bit about the music and level design of Rhythm Quest. Both are very closely related in this game, so really the two are pretty much one and the same.

We're going to use the level in this video as a case study. This is level 2-1, the first level in world 2 (Cloudy Courseway), currently titled "Skyward Summit".

World Theming

Thus far I've been trying to give each world (set of levels) both a distinct mechanical identity as well as a musical identity (and visual identity). This not only serves to introduce each gameplay concept to players at different times but also provides a sort of progression from world to world, rather than just having a lot of one-off levels that aren't part of a cohesive group.

Mechanically, world 2 introduces two new concepts: air jumps and flight paths (both related to jumping). This particular level introduces the airjump mechanic for the first time:

The visual identity should be pretty obvious here -- it's a "sky"-themed level, with clouds in the background. How do we match this musically? I actually had to make a few different exploratory sketches before settling on something for this.

Here's one which really didn't pan out at all, some sort of relaxed lo-fi vibe or something?

This next one is more trance-inspired, with a kick drum on every beat and sidechained saw-wave chords.

The musical call-and-response patterns work really well, and you might be wondering why I didn't run with this, but in the end the trance feel wasn't really getting me inspired.

This one ended up being the one I liked most (and got turned into level 2-3):

It's got a very lush soundscape which contrasts nicely with the other worlds. I decided that this would probably be the world that uses the most "modern" production techniques. In this segment you can hear non-chiptune drum loops, and lots of work with low-pass filters.

Soundscape Breakdown

Now that we have an idea of the general feel that we're going for, let's break down the different elements in the initial section of level 2-1. Here's what that sounds like as a whole:

First off we've got these chord stabs:

A few important things to note about these. Firstly, I lead off with a major 7th chord, which tends to subjectively have an "open" or "airy" quality to it. Throughout this world I'm trying to leverage 7th chords a lot (they're more harmonically complex), and major 7ths specifically to establish this feel.

The sound itself is more lush than a regular chiptune sound due to the use of detuning. There's three oscillators (each playing a 12.5% width pulse wave), each detuned by a bit. I'm also using sidechaining, where I'm "ducking" the volume on downbeats to give it a sort of organic/pulsing feel.

Next up, let's listen to the drums and other accompanying elements:

Nothing too fancy here, but it's worth noting that I'm using non-chiptune drums. Again, I'm trying to differentiate world 2 a bit more from worlds 1 and 3, which both lean more heavily into chiptune-styled instrumentation.

There are actually still a few chiptune elements present, though. Here's another drum loop that gets layered in, as well as the triangle wave bass patch that's used throughout the OST:

Yes, this particular world happens to lean away from chiptune instrumentation a bit, but overall the game as a whole is still built upon ("modernized") chiptune sounds as a basis.

There's a sort of balance to be had between cohesion and distinction. Every song on the soundtrack is still very recognizable as being of a certain style of mine, yet they each bring a slightly different flavor of it based on the elements contained within.

Melodies and Gameplay

Now let's talk about the call-and-response melodies that directly correlate to the gameplay elements:

This sort of direct link between musical callouts and gameplay actions is one of the defining features of Rhythm Quest, and is what separates it from games such as Dance Dance Revolution. This level of coordination between audio and gameplay is made possible because I'm acting as game designer, level designer, and composer all at once, and each of these roles guides the others.

This segment has two different instruments that trade off between each other.

The first is a chirpy triangle/square wave synth that uses pitch slides and 16th notes. This corresponds to the air-jump rhythms, so the idea here was to capture a "bird-like" nature in the sound to reflect that. The pitch slides help to reinforce the idea of jumping upwards and are also a nod to a bird-like singsong quality, while the 16th notes help establish a bouncy feeling (imagine fluttering wings).

I should note that a lot of these decisions happen more on an intuitive level rather than a rational one. I'm explaining it in words here so other people can understand, but my actual composition process isn't so "scientific" -- I just use my instinct and go with the first thing that I think of. I've used this kind of chirpy synth many times before, so it was an easy item to reach for in my proverbial toolbox.

The second instrument is a bell-like tone that corresponds to the attack presses. Again, this is an instrument that I've used many times before, so it's second-nature for me to bring it in here. A common mode of writing that I use throughout Rhythm Quest is to feature two instruments -- one to represent jump actions, and another to represent attack actions. This creates a straightforward and intuitive mapping between melody lines and button presses.

These mappings aren't set in stone, though. Just because I use the chirpy synth to represent jump presses in this particular section of the song doesn't mean that'll be the case throughout the song -- that would be too limiting and would probably get stale to listen to.

Here's a different melody line that plays later, in the halfway point of the song:

Notice that there's some amount of leeway being given here for musical expression that doesn't map one-to-one to gameplay presses. I could have written the soundtrack with the explicit rule that "one melody note = one button press", but that's way too limiting and would lead to bland melodies without any embellishments. Obviously different types of rhythm games will land somewhere different along this sort of spectrum: keysounded games like IIDX or Pop'n Music might literally adopt the "one note = one button press" rule by default, whereas games like DDR usually don't.

Level Design Considerations

Since music design is tied so closely with level design, I wanted to point out some extra considerations that I try to take into account (some instinctually, others more consciously) as I'm writing these songs.

The first is structure. Now, I don't tend to plan out the exact structure and/or length of my songs, but in general it's very natural to write out a song that follows this sort of basic formula, with maybe one or two deviations:

  1. Simple intro and/or catchy riff - Establishes the feel of the song, but is often missing bassline or pads, so the soundscape isn't "full" yet.
  2. Full section - First high energy point in the song. Chord progression and soundscape is full.
  3. Lighter "verse" - Some elements are taken away and other musical ideas are explored. Sometimes the chord progression is more simple here.
  4. Buildup - Elements are built back up in layers in preparation for the...
  5. Exciting climax - Highest energy point in the song. Full soundscape is occupied, and often features a sustained lead melody.
  6. Rampdown - Decrease in intensity from the climax, but often with some elements still sustaining throughout. Sometimes this brings back elements from Full section #1.
  7. Outro - Lower-energy, usually stripped down to only a few musical elements.

If you watch this video again, it should be pretty easy to pick out each of these distinct sections:

As it turns out, this is not only a great and well-practiced structure for a song, but it also works well for ramping up intensity in gameplay (not a coincidence at all). This sort of overall shaping and increase in excitement over time is what helps us get into "flow state" as we're engaging with music and gameplay.

Next up we've got repetition. Good music is frequently all about a balance between repetition and contrast, providing the listener with enough common elements for them to latch onto, but also providing enough variety to keep things interesting.

If you watch the video again, you should notice that the same gameplay rhythms and musical elements are often repeated twice or even four times in direct succession. This is something that's very important for the enjoyability of a song. The first time you hear a new musical phrase, you won't have any idea what to expect, but when it plays again for the second time (or with a slight variation), you already know what's coming, so you're able to "lean into it" and appreciate it more. (You can in essence "mentally hum along" to the music on the second repeat.)

Gameplay-wise, this also serves to build patterns into the gameplay rhythms that players can latch onto. Once you have a rhythm in your head, it's much easier to repeat that rhythm again, so this provides a chance for the player to feel a sense of mastery. Alternatively, if the player struggled on the rhythm the first time around, this provides another chance for them to get it right, this time with more familiarity.

Repetition is especially important in the first few worlds of the game, where I want to start things off simple and gradually ease into more complex and faster rhythms.

Finally, there's the consideration of note density. There are two main ways in which I try to take this into account. First, I need to think about the frequency and length of empty spaces within musical phrases. These empty spaces without notes provide players with "lookahead" time to prepare for the next elements that are coming up, so having more of them will make a song easier to process. In contrast, a song that constantly throws notes at you with no chance to rest will be perceived as more difficult. Call-and-response melodies are really good for this as they provide natural breaks in musical phrases.

Secondly, I also need to simply take into consideration the number of button presses that I'm asking the player to process within a given time, as well as the relative complexity of the rhythms (is there syncopation? are there held notes?), all of which affects the difficulty. The best way to analyze this is simply to play the section in-game, but I also have some code which will analyze the obstacles in each level and spit out some statistics for quantitative comparison.

For example, level 1-1 currently features 0.8 button presses per second, while level 2-3 is more than twice as much at 1.7 button presses per second. This gives me a rough way to estimate the general difficulty of a song and evaluate whether I might need to make tweaks in order to adjust the difficulty curve across the worlds.

<< Back: Devlog 12 - User Experience Flows
>> Next: Devlog 14 - Closed Alpha Test Feedback