Studio X Labs had the distinct privilege of providing comprehensive sound design, audio programming, in-game mixing, and playback systems for Reverse Collapse: Code Name Bakery. This project marked our first long-term collaboration with a Chinese developer. Leveraging Wwise as our audio engine was crucial to delivering an optimal audio solution.
The challenge and enjoyment of creating audio for games often lie in problem-solving and developing the necessary pipelines, systems, and structures to achieve the best possible mix of all audio elements. For Reverse Collapse, our journey spanned four years, with an eight-month hiatus in 2022 to accommodate a substantial expansion of the story and missions.
Despite the challenges posed by different time zones and languages, we established a process that ensured the game's successful reception among fans of the Girls Frontline franchise.
Reviews:
“Reverse Collapse: Code Name Bakery is fun to play and visually appealing. But on top of the game being visually appealing, there's also the sound design that went into it. The music sets the tone while the sound design packs the punches needed. Even without an English dub the voice acting in the game is solid, gunshots have the impact that one would expect, and explosions that truly pack a punch, delivering an immersive experience that feels just right for the setting and genre.” 4/5 - Hardcore Gamer
“With the right audio equipment, you can enjoy the game’s excellent sound effects to the fullest. The game’s punchy gunshots and explosions offer an incredible amount of godly immersion. Plus, the way every enemy soldier moves on the battlefield with heavy, rhythmic, almost threatening footsteps adds a well-deserved urgency to each mission.” 92/100 - Game8
Creating the Content Implementation Pipeline:
At the outset of the project, we needed to develop a robust content pipeline to effectively deliver audio across several critical areas:
- Sound Design: Crafting audio for characters, weapons, and environments to complement thousands of custom animations.
- Localization: Ensuring seamless playback for the Japanese language version of the game.
- Interactive Music System: Implementing a dynamic music system that adapts in real-time to minute-by-minute gameplay changes.
Character Animations:
Reverse Collapse is a game with an extensive number of characters and custom animations. To efficiently manage the vast number of animations requiring sound design, we implemented a folder system based on nested Switch Containers. This approach allowed us to minimize the number of AKEvents called from Unity, significantly streamlining the process and giving sound design flexibility on a per base character. By using nested Switch Containers, we could direct character events to their designated folders effectively. This system was essential given the number of animations we were dealing with. There were 27 playable characters and 72 enemy characters, all sharing the same nested Switch folder structure. So, looking at the lead character Mendo’s Switch folder:
Each of the Switch Containers within the Mendo folder has Switch Containers attached to a specific Event type, like Run, Grab, and Putback. For the "Run" actions, we incorporated all environmental surface variations as well. For "Death" animations, each Blend Container holds SFX assets organized into random folders for variation and timing conformed to the custom character animations. The "Grab" actions include animations for each of the 52 usable items.
This structure scales significantly; for example with 27 characters handling 52 items each, resulting in 1,404 grab animations and an additional 1,404 putback item animations across all playable characters. Using nested Switch Containers made these event calls very manageable.
Given that many characters share similar animation types (such as running, falling, death and grabbing items), we optimized memory usage by reusing a significant amount of SFX assets across all character types. Sounds like footsteps, cloth foley, and item usage were efficiently replicated across characters once the foundational assets were created.
The time-consuming aspect was testing and tuning each character and enemy animation in the character parking lot, making precise SFX timing adjustments as required by custom animations. With literally thousands of character animations, our approach of using Switch Containers to manage and distribute character and enemy events proved to be the most effective solution.
Weapons:
For weapons, we used the Switch Containers; but since the player characters can use any of the 52 items, we organized the nested folders in reverse and based it on characters. So within each of the item Switch Containers, there are character Blend Containers that give the same flexibility so that each use of the item can be character-specific. Since there was so much custom animation in the game, again we could reduce the number of skill events being called and let Wwise parse out the destination of the event through the referenced world object.
Interactive music system
Reverse Collapse is a game known for its intense and meticulously-crafted composition of background music tracks which enhance both gameplay immersion and the overall artistic vision. For this project, we collaborated closely with the talented Chinese composer G.K., who is best known for his work on Girl’s Frontline and Project Boundary.
The music system is designed to be interactive and scalable, accommodating the extensive number of levels in the game. Each level supports up to 3 stages, and during enemy turns, the music mix undergoes special modifications to reflect the change and enhance the gameplay experience while waiting for the enemy units to finish their turn. Additionally, special cases, such as boss battle music and the faithful music restoration of the 2013 original game levels in the remake, require careful handling.
To achieve this ambitious goal, we utilized a variety of tools available in Wwise to their extent. These tools include the flexible Interactive Music Hierarchy, such as nested Music Switch Containers and States that control which music should be playing. We also implemented custom music cues to support boss music on top of the music States, and RTPCs that are seamlessly connected to the music tracks, and integrated these elements with the game's code.
Music Switch Containers and States
Reverse Collapse offers over 60 hours of content and more than 60 different levels. To manage this substantial amount of data, we chose to link our music data names to match the names used in each level, as illustrated in the picture below.
The picture above illustrates an example of the interactive music setup for Chapter 1 in the game. Similar setups are used in the subsequent folders. Initially, we considered identifying unique tracks to create fewer Music Playlist Containers. However, after weighing the pros and cons, we decided to have three Music Playlist Containers for each level. Here are some of the reasons for this decision:
Pros:
- It’s a universal solution. Each level can have up to 3 stages; some may only have one or two. In these cases, we can simply reuse the same music segments for the stages that are not needed. This approach is effective and adaptable.
- This approach matches the data table in the game, allowing us to use the levelId variable, which is already used throughout the game, for the music systems as well. This ensures integration consistency.
- It is easier to integrate with our SoundBank management solutions, as each level has its own SoundBanks for music and cinematic-related files. This streamlines the process and ensures efficient organization.
- This setup provides the flexibility to designate any level for special treatment without impacting other levels or causing potential knock-ons.
- Given our remote collaboration with the team in Shanghai, efficient communication and iteration speed are crucial due to time zone differences. Compared to typical day-to-day work at the office, communication may be slower. To streamline this process, we've listed out every level in the game, ensuring that anyone working with the Interactive Music Hierarchy can grasp it quickly. This approach facilitates easier management and editing of files for the composer and sound designer.
- Significantly less code is required since we don't need to select music tracks interactively. With this setup, when a level is loaded, we know that the corresponding music for that level will automatically play. This simplifies the development process and reduces the amount of code that needs to be managed.
Cons:
- The initial setup process on the Wwise end of things may be very tedious, but once it's configured, the system becomes straightforward to use.
- There's a risk of errors due to the similarity in naming and structure, making them challenging to notice and test quickly.
- Edits that happen within the music system structure in Wwise are slower because you have to track the same music tracks across different containers.
RTPC for switching enemy turns
Enemy turns occur frequently in the game, especially in later levels, and can take up a significant amount of players' time as they observe enemy engagements on the maps. While this process can be accelerated through a press of a button, we still opted to enhance the player experience by modifying the music, offering an alternative mix for those who choose to spend a considerable amount of time navigating through enemy movements.
The process starts with the alternation of the original music tracks. The composer G.K. did a great job, adapting the changes swiftly, providing us with re-mixed enemy turn music tracks with the same length compared to the normal combat turns’ counterparts.
On our end, we applied a special treatment by mirroring the structure and implementing an RTPC with interpolation time for crossfade between the player/ally turn music and the enemy turn. As the enemy turn commences, this RTPC gradually transitions from 0 to 1, and vice versa, initiating the alternative mix.
The screenshot above illustrates how the RTPC will be adjusted. In the code, we linked this RTPC call to occur when the enemy turns to happen and restored it when the player and ally turn starts.
In the Events tab, our main music event triggers two Switch Containers simultaneously, each with different music mix properties. We can decide which one to play at any given moment using the RTPC mentioned earlier. Since the duration of each version of the music mix is the same, triggering them simultaneously and using the RTPC to switch between them allows us to achieve seamless transitions at any time between the enemy turn mix and the player/ally turn mix.
Boss Music Segment Transition
To support the special case of the Boss Turn, we've incorporated an RTPC on top of the existing 3-stage interactive music system. This setup enables us to seamlessly transition between the normal combat music segment and the boss music segment at any point during gameplay.
One challenge we need to address with this setup is that boss music segments might have different lengths compared to normal combat music. This could pose an issue if the target segment is shorter than the current segment, potentially resulting in a period of silence in the music.
The image above illustrates the issue when transitioning between the two music segments. Since both segments play simultaneously during the transition, if we attempt to transition to RC_RW_B10_pre_Upver at the end of RC_Boss3_preV2, a brief moment of silence will occur, which is undesirable in our case.
To resolve the issue, we implemented the Seek() (Seek (audiokinetic.com)) function and utilized two custom music cues provided by Wwise in our music callback function: NormalExitCue which denotes when the duration of the normal track is the shortest of the two, and BossExitCue, which indicates when the boss track is the shortest. We added a code segment to detect whether we are switching from the Normal or Boss exit cues. Then, we seek the beginning of the target track with a quick cross-fade and play it.
In this example, we'll create a small wrapper function to extract the output value of the parameter modifier and apply it on demand in the area where we intend to use this functionality.
public float GetGlobalRTPC(string rtpcName)
{
int rtpcType = 1;
float acquiredRtpcValue = float.MaxValue;
AkSoundEngine.GetRTPCValue(rtpcName, null, 0, out acquiredRtpcValue, ref rtpcType);
if(acquiredRtpcValue >= 0.25 && acquiredRtpcValue <= 16).
{
return acquiredRtpcValue;
}
else
{
return 1.0f;
}
}
In addition to setting the RTPC globally, the function above will also ensure that if incorrect values are detected, it will ignore the RTPC to be set, and reset the value to 1.0f, which is the default.
public void MusicSegmentSwitch(object in_cookie, AkCallbackType in_type, object in_info)
{
if (in_type == AkCallbackType.AK_MusicSyncUserCue)
{
var musicInfo = in_info as AkMusicSyncCallbackInfo;
if(musicInfo != null)
{
if (musicInfo.userCueName == “BossExitCue”)
{
if (GetGlobalRTPC(“BossBattleMusic”) > 0.5f)
{
AkSoundEngine.Seek(musicPlayingID, 0, false);
}
}
if (musicInfo.userCueName == “NormalExitCue”)
{
if (GetGlobalRTPC(“BossBattleMusic”) <= 0.5f)
{
AkSoundEngine.Seek(musicPlayingID, 0, false);
}
}
}
}
}
The code segment above shows an example of utilizing the BossBattleMusic RTPC, clamped at range 0 to 1, to switch between music segments interactively; upon switch, the music segment will be rolled back to its beginning and restart playing with a crossfade effect.
Disclaimer: The code snippets utilized in this article are reconstructed generic versions intended solely for illustrative purposes. The underlying logic has been verified to function correctly. Specific project-specific API calls and functions have been omitted from the examples due to potential copyright restrictions.
Commentaires