Crescendo for the Eight String Guitar

Ritual Studios co-owners Jeff Linville and Maximilian Lubbers share how they orchestrated a unique music-based combat system for Fretless: The Wrath of Riffson, powered by FMOD for Unity.
Fretless: The Wrath of Riffson from Ritual Studios is a “guitaRPG” where players embark on a quest to relinquish the world of rock music from the greedy clutches (and soul-binding contracts) of an evil record company CEO. The hero, Rob, is based on music YouTuber Rob Scallon, who Ritual Studios also collaborated with on a documentary to coincide with the game’s launch.
Music is built into every facet of Fretless: The Wrath of Riffson, including its turn-based battles. “Instead of collecting swords and shields, you collect instruments and riffs to use in musical combat,” explains Jeff Linville (sound and music). “When you use skills in the game, they’re called riffs, they each have a sample of music associated with them, and they seamlessly weave into the combat backing track.”
Making Fretless: The Wrath of Riffson’s music and gameplay work in concert was priority number one for Ritual Studios. Here’s how they created a music-based combat system for their game using FMOD for Unity.
In Fretless: The Wrath of Riffson’s turn-based combat, musical instruments are weapons and riffs are their abilities. When Rob plays a riff during an enemy encounter, it triggers an effect – damage, healing, block, debuff, etc. – along with a corresponding music clip that harmonizes with the in-game soundtrack in real-time. Riffs can be chained together to activate super moves called crescendos, initiating a Guitar Hero-like minigame that also interacts with the background music.
"Our goal with the combat system in Fretless was to make the player feel like they were arranging their own mini-song when selecting riffs," says Jeff. "Some of the synergies between riffs compliment each other musically, so when you have a great turn, it sounds great as well."
Crescendo for the Eight String Guitar
Ritual Studios started building Fretless: The Wrath of Riffson’s musical combat system by recording a modular soundtrack. Each of the game’s 13 combat tracks consist of short loops that can be played in any order. “Each boss has its own combat track, and then each instrument has its own boss backing track, too,” says Jeff. “Within each track there’s a ton of variation so that when you’re playing, it doesn’t get too repetitive.”

Dynamic music system
The dynamic music system in FMOD for Unity is used heavily to jump between these modular pieces of music, which are tagged to play during specific phases of combat.
“When you’re selecting your Riffs, the FMOD track plays the portion of music we’ve chosen for that,” says programmer Maximilian Lubbers. “Then, once you’ve confirmed your Riff selection, you jump into what we call the arrangement sequence, or ‘shredding’ in the game. Once you shred, the FMOD track jumps forward again to another portion of our dynamic soundtrack where your selected Riff plays out.”
Pressing “Shred” to start your turn in combat
Marker callback system
FMOD for Unity’s marker callback system is used to trigger the game events in the scenario above. With this tool, developers can add cues (“markers”) at specific moments in audio files to trigger different actions in-game. When an audio file is playing and the playhead reaches one of these markers, it sends a signal (“callback”) to initiate gameplay elements like character actions or visual effects, all in perfect sync with the audio.
To get this up and running, Ritual Studios built a timeline on FMOD with increments aligned to the tempo of each combat music track. “Our combat is always running on our FMOD track,” explains Maximilian. “You could think of it as if you just laid out a big ruler on top of the track, with all of the combat events plugged in along there.”

These increments conveniently double up as slots for different skill effects, and were also helpful for making Fretless: The Wrath of Riffson’s input system feel as responsive as possible. When a player presses a button for an attack or a block, the game registers the input and waits for the animation to reach the corresponding beat in the soundtrack before registering whether the action is a hit or a miss. This allows each combat interaction to occur seamlessly in time with the music.
“For a lot of the earlier part of our project, we were utilizing ScriptableObjects for customizing this stuff,” says Maximilian. “For example, the crescendos still use a Boolean checkbox system to determine which inputs will actually trigger the combo, and that’s connected to our markers in FMOD – as those markers are being passed, that’s when the inputs are being thrown to the players.”

Programmer instruments
Jeff and Max both say programmer instruments in FMOD for Unity were also very helpful for speeding up iteration times during production.
“Because we were battling the audio buffer in real-time, we would have had to load in audio confirmations every time a riff missed or connected in combat. We needed some way to bypass the loading time, because we’re talking milliseconds – we might miss it on the input and it would play no audio,” says Maximilian.
“Because of the way that our skills are loaded based on player input, we ended up using ScriptableObjects to make a mixer for me that works live,” says Jeff. ”Now when skills are playing, I can open the ScriptableObject and drag the sliders around to turn up the volume and stuff like that, right in the Editor. Before, we weren’t able to do that because of the way we had to load the files into the game.”

With Fretless: The Wrath of Riffson, Ritual Studios shows how FMOD for Unity can be used to craft an elegant and deeply integrated musical combat system that more than does justice to its source material. With the help of tools like the dynamic music system, marker callback system, and programmer instruments, Ritual Studios successfully produced a game where music isn’t relegated to the background, but given center stage as part of an interactive, gameplay-defining mechanic.
“For me, to be able to write the music and make it go through these sequences in FMOD, it was so helpful just to have everything in this visual interface,” says Jeff. “Being able to plug in markers, make callbacks, and have it all visible on a DAW [Digital Audio Workstation] is just really good.”
“Without FMOD for Unity, I don’t think this game would have been possible,” adds Maximilian.
Fretless: The Wrath of Riffson is out now on Steam. Follow more Made with Unity games on our Steam Curator page, and check out more stories from Unity developers on our Resources page.