Skip to content

Sound

Knockout City’s sounds live in sound banks: large files holding many sounds and the rules for playing them, such as picking one of five footsteps at random or fading music in. Nothing plays a sound file directly. Things play sound events instead: named sounds that point at something inside a bank.

Each one uses the ones to its right.

  • Script or levela sound to play
    • Sound eventball_hit.sound_event
      • Bankthe event inside itpicks a clip, sets the volume
        • Cliphit_01the audio
        • Cliphit_02or this one
From 'play this' to a noise. The names are illustrative; every sound follows this path.

A script plays a sound event; a level can hold one on an entity; an animation can fire one at a moment in a clip. All of them go through the same chain.

To change what something sounds like, replace the clip inside the bank. Everything that plays that sound now plays yours, and nothing that points at it needs to change. Studio’s bank viewer lists every clip in a bank and can replace one with your own audio, or put the original back.

Import an audio file (WAV, MP3, OGG, FLAC and more) into a folder in Studio, and it becomes a clip in that folder’s bank. Give it a sound event, and scripts and levels can play it by pointing at that event. The sound cookbook shows a script doing it.

Like effects, sounds play on each player’s own game. A script that plays one has to run on every machine, or only some players hear it.

For programmers

Audio is Wwise. A script or level posts a named token; data files map it to a .sound_event, which names an event in a bank; the bank’s hierarchy picks the media. Studio stores your edits as a patch of ops over the shipped bank and bakes the bank on demand, so preview, test and export all get the same bank.

Gameplay data: how the game plays.