Pizza Tower

External Audio Framework allows you add an audio file into the game. It scans the folder inside "Pizza Tower/mods/sounds/" to find all the audio files.
OGG and WAV
format are supported. The added audio files can then be referenced by their filename.In order to modify the audio's properties, i've setup a set of suffix in which you can define the audio properties using this naming convention :
Audioname_gainN_timeN_pitchN.ogg
Audioname_gainN_timeN_pitchN.wav


The N in each suffixes in the naming convention corresponds to a numerical value that you can define for the audio's properties.
Here's a glossary that explains each suffixes

  • Gain: Value for the music volume.
  • Time: The length for the change in gain in milliseconds.
  • Pitch: The pitch multiplier of the audio

In order to add audio files to the game and set their audio properties, place the ogg/wav audio with their suffixes into "Pizza Tower/mods/sounds" for example
peppino_taunt_sfx_gain5_time0_pitch1.ogg
peppino_dash_sfx_gain5_time0_pitch1.wav

I have set a default values for the suffixes if you didn't define any of them. The default values of each suffixes being :
gain = 1
time = 0
pitch = 1

WAV VS OGG
In general, wav is better than ogg files because they are a lossless sound container but overusing WAV can increase ram usage drastically.

You should use WAV when
  • The audio file is playing repeatedly, such as footstep and jump audio
  • The audio size isn't too big, usually under 10 MB
You should use OGG when
  • The audio file isn't playing repeatedly like the mentioned above
  • The audio file is a long duration music/ambient sound


Common issue that you might encounter :
No Sounds playing are causing by incorrectly referencing the audio name

Article information

Added on

Edited on

Written by

yajneS

0 comments