Solo Gamedev on a Micro Budget

Music Composition


Created: Fri Apr 28 2023
Read Time: 15m
Requirements: You enjoy playing music.

As a solo game developer, you are in charge of everything, which includes the music for your game. You can outsource this responbility to a composer of course but what if you're on a micro budget or prefer to DIY? In this mini-tutorial, we will take a look at a simple 5-step recipe to compose music for your video game. If you can play a music instrument or know some basic music theory, you should be able to follow along. Let's start with...



Step 1 - Understand the Context

Before you can compose meaningful music for your game, you first need to understand what you want the player to feel. Music which fits the mood of a scary hallway will not work in a cartoony action sequence. Most of the time, the difference between your game scenes will be more subtle than this, but those subtle differences can have a profound impact on what the music should be. Therefore, we need to describe the full context in which the music plays to get the best results. So, simply write down the question:


What should the player experience when this music plays?


When answering this question, focus on finding suitable verbs, adjectives and adverbs. You can use the story and relevant characters, which includes the environment, to find these. Let's go through a quick example using a scene from Rusty's Day Off:


Fig. 1 - The unscored cutter scene in Rusty's Day Off.

In this scene, the player must avoid an unstoppable cutting machine. We can see that the lighting is dim and cold. The player can most likely hear the cutter flying by so we can try to incorporate it's cutting motion into our music. Let's describe the context using verbs, adjectives and adverbs:



You can provide more detailed answers than this. More importantly, your answers might be entirely different and that's okay. If you are struggling to find the right words, ask your playtesters what they think. Prefer sharing videos over screenshots as they provide more context. When you do this, make sure you do not bias them towards what you think and as with any feedback, take it into consideration but make your own decision in the end.



Step 2 - Choose the Sounds

In the previous step we established the overall mood for our piece of music but we haven't talked about the sounds we associate it. It can be very tempting to skip this step and use your favourite instrument but you can usually get more interesting results by using your previous answers to choose an instrumentation. Let's describe the sounds (or lack thereof) for each answer:



Notice how some of the descriptions are overlapping. This is okay and actually a good sign that you are on the right track. You want as much consistency as possible to paint a clear sonic picture. If you have conflicting observations here, it is best to double-check your understanding of the scene and take note of it now, so that you can spread them apart in your arrangement or instrumentation to avoid ambiguity. If you are struggling here, ask other composers or an AI like ChatGPT to assist you in finding possible answers.



Step 3 - Choose the Forms

While rhythm and pitch are very important in music, you should try to think of the overall structure of your composition first since it will dictate the scope of the story your music can tell. Like a news article, each section of your piece should build upon the ideas that came before it. This allows the listener to follow your music more easily and makes it sound a lot more coherent and well-organized than a series of brilliant but random ideas. As a composer, it also allows you to begin estimating how long you expect the final piece to be. A slow build-up might be too long for a short gameplay section. Similarly, a short, dynamic piece might be irritating when looped as background music. In video games, you can often get great results using simple forms, like the binary or ternary form:


Binary Form (AB)

Idea 1Idea 2
(A)(B)

Ternary Form (ABA')

Idea 1Idea 2Idea 1 Recap
(A)(B)(A')

These short forms give you just enough room (usually 4 to 8 bars) to state your best ideas for a scene and can be looped quite easily by ending on authentic cadences - perfect for a video game! To organize your individual ideas to sound just as coherent, try composing them as a period (calm, steady) or sentence (moving, action).
You can also make up your own forms of course, for example:


Slow IntroMain Idea 1Main Idea Variation 1Main Idea Variation 2 / Finale
(Intro)(A)(A')(A'')

Notice how we haven't written any music yet. We are still thinking about it from the listeners perspective and what we want the experience to be as opposed to cracking our knuckles and shredding a solo. You usually only need one good idea and a variation of it to create a well-rounded piece of music.



Step 4 - Fill in the Sketch

Now that you have a better understanding of what you want to achieve structurally, you can start filling in the notes by doodling around on your favourite instrument or program until you find something that fits the bill. Keep in mind the feeling you want to convey and which instruments can help you achieve this feeling. You should also have a very rough idea of the relative length of each section, thanks to all the work we have done already.


One of the easiest ways to identify a good composition in this step is to hum it inside your head. You will notice that most of the time, you will only adjust your voice in half- or whole-steps, followed by an occasional leap up or down a larger interval like a 3rd or 5th. This applies to chord changes as well. A progression from C to Emin sounds perfectly smooth because they already share two notes and the new 5th of the Emin chord is the 7th of a Cmaj7 chord. So when you play a Cmaj7 chord, you are hearing both a C and an Emin chord at the same time. If you move the B up a half-step you're already back at C. Because of this, it is very easy to achieve smooth voice leading between them. Try exploring this idea of close relationships further by playing a chord, changing one or two fingers and keeping the rest of the chord as is. You can compose very sophisticated, smooth harmonic progressions with this simple technique. Add a few passing notes, one low and one high point, some rhythmic variation and you got yourself a basic melody my friend.

To expand on your initial ideas in interesting ways, it's helpful to know a little bit of music theory.

Here are a few tips to keep in mind:


This list is by no means exhaustive and the material in this mini-tutorial does not cover them in detail. I can only say that it helped me to read a bit more about them so hopefully it will help you too.

Let's have a quick listen to the music for the cutter scene:


Fig. 2 - The scored cutter scene in Rusty's Day Off.

The music uses a simple "Intro | A" form and sticks to the verbs, adjectives and adverbs we discussed in the previous sections. The instrumentation follows our text notes. The fact that it fits the scene is not surprising or by chance at this point.



Step 5 - Polish

This should be the last piece of the puzzle. Your music should already sound coherent, well-structured and complete. The mix probably doesn't sound great yet and it won't have all the bells and whistles (literally). If you do not have a lot of time, just skip extra embellishments altogether and finish the mix. You will always find things you want to change so you just need to reach a point where you can listen to it a few times without wanting to leave the room. Once you've reached that point, it's usually best to consider it done and come back to it later if you have time left. As a solo developer, chances are that missing embellishments will be the least of your worries.



Further Reading

All of the steps described in this article, the forms and "rules", are merely suggestions that you can break at any time, nothing is set in stone. They mostly exist as fail-safe options so you don't compose a whole bunch of different ideas which you struggle to put together later (composers block).

Feel free to pop into our Discord if you have any questions or need help with any of these steps. You should also take a look at the excellent books on Music Theory and Composition by Jonathan E. Peters (not affiliated). They were tremendously helpful during the development of Rusty's Day Off and helped create these simple steps. Also check out 8-Bit Music Theory and Ryan Leach on YouTube for more content on music theory in video games.


If you liked this article, you can follow us on Twitter or join our Discord where we will be posting new updates in the Solo Gamedev on a Micro Budget series!