When we think of using Wwise as audio middleware for game music, we generally think of games with complex music systems in which interactivity plays a fundamental role. However, I’ve found that Wwise can also be very useful for small casual games with more linear music.
My primary job is music composition, but I’m also a developer, so imagine how much I like Wwise. When other musicians ask me to explain what Wwise is, I usually define it as a bridge between composing and programming. It allows you to see music through a prism of interactivity.
In this post, I will show you some of the advantages of using Wwise in Encounters, a casual music and rhythm game for mobile devices that I developed, composed for, and implemented. But before that, let me tell you how this game came about.
The Story Behind Encounters
I think there are two types of people: specialists (those who’ve mastered some skill), and generalists (those who are fascinated by everything and like to experiment). Most of the time, I have belonged to this second group. I especially love everything related to multimedia: code, music, games, video... but lately I was trying to focus on music, my favorite thing. So much so that I did a master's degree in soundtrack composition and even composed and recorded some themes with a big symphony orchestra in Bratislava. Today, music is my main way of life, and I create original music for all kinds of audiovisual projects.
Although most of the music I had made before Encounters had been linear, I had an urge to delve into the field of interactive music, because it combined everything that I found fascinating. Being both a composer and a programmer provided me with knowledge that I think is very useful in this particular field. And artistically, my goal was to focus more on emotional impact and musical soundscapes rather than fitting the music into fixed frames.
So my next step was obvious: learn audio middleware like Wwise. After doing all the tutorials I found, I figured that the best way to learn was to work on a real project where I could incorporate that knowledge.
First step: Just connect Wwise with a game engine like Unity. Hmm, I could make a little music game to start. What if I made a game in which music was so important that once you learned a level you could play it with your eyes closed, guided only by the music? Sounds like an interesting challenge. What if the player had to coordinate two parts of the song at the same time, maybe two different instruments? And if they are two musical lines, what if the game included two cute characters, each one playing a part of the song, and these characters had to encounter one another?
I finally got so excited about the idea that I decided to take the plunge and invest all my time into this game - not just to learn Wwise, but to make a full game and eventually publish it.
At first, I planned to use only my own compositions, but later I decided it would be better to also include adapted versions of songs in the public domain, because it would be easier for players if the music was familiar to them. For the lovely level stories, I had the help of a very good friend of mine who writes much better than me.
The game was initially going to be in 2D, and because design is not my strong point, I contacted a 2D designer. In our first meeting, we realized that I still had some uncertainties about the game mechanics; so before he started working, I had to better define what I wanted. As I don't know how to draw, I did some proofs of concept in 3D, and to make the characters I used basic figures, such as cubes and cylinders, and drew some simple textures.
Surprisingly, I liked how they looked so much that I decided to do the design for the game as well (except for the backgrounds of each level, for which I used stock images), and it became a 3D game. In the end, it was fortunate that things happened this way, since I could only have paid for the design of two or three levels, and doing everything by myself, I now have the ability to update and create new levels whenever I want.
Here you can see some of the current characters, more coming soon... :)
And here’s a trailer for the game so you can see for yourself how everything ended up coming together:
Now that you know how and why this game came about, I want to explain a little about how I used Wwise (and why I no longer consider doing anything without it).
Creating Loops | Child's Play
In the level selection screen of the game, where you select a level, you can listen to the theme of each level in a perfect loop. Anyone who’s tried to create loops with other tools knows that making a perfect loop is not a trivial matter. In addition to the struggle to avoid those annoying clicks when the loop restarts, we’re forced to adapt the type of melody so that the change is not problematic. Or we have to paste the tail at the end of the music to the beginning of the song, which means the first time it’s heard, it sounds unnatural.
With Wwise, something so complicated becomes child's play. The first few times I tried Wwise, I loved experimenting with creating perfect loops of songs that definitely weren't made for looping. It’s enough to select the Exit Cue and, in case we have saturation problems due to the tail having too much volume, perhaps add a small fade in at the beginning. Positioning the Exit Cue is easy; assuming the Music Segment has its BPM assigned correctly, just snap the Exit Cue to a bar/beat.
Here’s a sample of a loop created with Wwise for the level selection screen of the game, where you can listen to the songs of all available levels. This example belongs to the second level, called “Wandering Souls”:
Reusing Audio Files | Size Matters
Each song, in addition to being heard in a loop in the level selection screen, obviously plays when you enter the selected level. When you fail, you can replay from the beginning or from different control points. Each level has five possible control points from which to resume the level.
These are different Music Segments of the same Music Track: loop, level start, and the first two control points.
As you can see in the preceding images, another great advantage of Wwise is that all these versions use the same audio files. That saves a huge amount of space, something important in general, but absolutely crucial in games for mobile devices.
In the same way, the drumstick that sounds as a guide, both at the beginning of the level and at each control point, is also a small audio file that I reuse wherever I need it. In this video, you can hear the start of the Music Segment of the level and the first control point:
On the topic of reducing final game size, another advantage of Wwise is that you can work with files at the highest quality and, when generating the final SoundBank, experiment with different compression values until you find the desired balance between quality and size.
Using Sequence, Continuity, and Randomization
When you pass a level, the characters encounter and dance together on a final platform. Although a player will most likely stay in this scene for a brief moment, there may be players who are hooked watching those fun dances. That small possibility is an excuse to take advantage of the Wwise and add a bit of musical variability to that scene for the player that chooses to stick around.
For this final scene, in addition to creating a small music riser, I created 11 tracks that could be combined with each other (vertical remixing) and that would fit as a loop (using the technique I mentioned at the beginning of this post). Each track lasts eight bars without counting the final music tail.
The first Music Segment after that riser is always the same, since I wanted to control how the first seconds sound after passing a level. To do this, I created a Music Segment with five of those Music Tracks and modified the volumes and the point of entry of some of them.
After this, the random section begins, which will be repeated infinitely. In this loop, four Music Segments are played in continuous sequence. Most of the Music Tracks in these Music Segments may or may not play randomly. To do this, on each Music Track, I added a Random Step, one containing the sound and the other empty.
Although it’s unlikely that none of those 11 tracks will play, the way to ensure that there is no silence is to make sure that at least one of the instruments is not random. For example, in this segment most of the tracks have a 50% chance of playing, the last two tracks have a 66% chance, and the piano track will always play.
In each of these four fragments, I vary which are the fixed tracks: for example, in the first segment, a guitar is guaranteed to play; in the second segment, a piano, and so on. In this way, it is highly unlikely, although not impossible, that the loop will sound exactly the same twice in a row.
In short, the playlist that is played at the end of a level has this structure:
1. It begins with a small victory riser.
2. Then there is a fixed Music Segment that lasts eight bars.
3. A continuous sequence of four Music Segments begins, which will be played one after the other in an infinite loop. Each of these Music Segments has a fixed Music Track, and the rest of the Music Tracks may or may not play randomly.
Do you want to listen to the result? This way you will better understand how this playlist works. Keep in mind that each time it is played it will sound different, so this is just one example of what it might sound like.
Conclusion
Wwise has so many advantages that I can no longer imagine making a game without it. Even in simple games that do not make use of its more advanced interactivity features, the advantages are obvious. Some musicians may be a bit intimidated to start working with this tool, but once they are familiar with it, I highly doubt they will ever look back.
My general advice to learn any tool or skill is: make your own little projects. You will learn more, you will have more confidence in yourself, your portfolio will grow, and you will have a better chance of being hired. And who knows? You might like what you've done so much that it becomes your job.
If you want to experience everything explained above for yourself, the game is available for free for both iOS and Android.
My next goal, besides continuing to update the game, is to refocus on interactive music for other games. If you'd like to learn more about me and my work or contact me, check out my website. Meanwhile, to continue learning, I plan to carry out small interactive music experiments applying each of the possibilities that Wwise offers. And maybe I’ll also do some little tutorials, which could also be a good way to learn by myself.
Comments