Sound is a form of energy created by vibrations. In computers, sound is represented as digital audio, which means it is stored and processed as numbers.
In video games, sound plays a crucial role in creating immersive experiences, from background music to sound effects like footsteps, explosions, or a character's voice.
Analog Sound: Natural sound waves that are continuous, like the sound you hear in real life.
Digital Sound: Sound converted into numbers that computers can process.
To create digital sound, an analog-to-digital converter (ADC) records snapshots of the sound wave at regular intervals. These snapshots are called samples.
What is Sampling?
Sampling measures the sound wave’s amplitude (height) at regular intervals and converts it into numbers.
A higher sampling rate means more samples are taken per second, resulting in better sound quality.
A lower sampling rate reduces quality but takes up less storage.
Sampling Rate:
Measured in Hertz (Hz), it tells how many samples are taken per second. For example:
44,100 Hz (44.1 kHz): CD-quality audio.
8,000 Hz: Telephone-quality audio.
What is Bit Depth?
Bit depth determines how accurately the sound’s amplitude is measured.
Higher bit depth: More detail in the sound (better quality).
Lower bit depth: Less detail but smaller file size.
Common Bit Depths in Games:
8-bit: Retro game sounds (basic and chiptune-style).
16-bit: CD-quality sound used in most modern games.
Example in Games:
A retro arcade game might use 8-bit sound effects to match its pixel art style, while a modern RPG uses 16-bit or 24-bit audio for rich orchestral soundtracks.
Sound in games is often stored in compressed file formats to save space.
WAV: Uncompressed, high-quality audio (large file size).
MP3: Compressed, smaller files but slightly lower quality.
OGG: Common in games, balances quality and file size.
Example in Games:
An open-world game might use MP3 or OGG for background music to reduce file size, while critical sound effects like gunshots might use WAV for precision.
Sound channels determine how many sounds can play simultaneously.
Mono: Single channel (one sound source).
Stereo: Two channels (left and right).
Surround Sound: Multiple channels for an immersive experience.
Example in Games:
Mono: Classic 8-bit games like Pac-Man.
Stereo: Modern platformers, where sound shifts left or right based on the character's position.
Surround Sound: First-person shooters, where footsteps can be heard behind or to the side.
Sound is used in games for:
Feedback: Indicating actions like scoring points or getting hit.
Immersion: Setting the mood or environment with background music.
Direction: Helping players locate objects or enemies (e.g., footsteps).
Example in Games:
A chime sound when collecting coins in Super Mario.
Dynamic music that changes intensity during a boss fight.
Sound is stored digitally using sampling and bit depth.
Higher sampling rates and bit depths = better sound quality.
Common formats include WAV, MP3, and OGG.
Sound effects and music bring games to life by enhancing feedback, immersion, and direction.
Start exploring how sound works in games by paying attention to the music and sound effects in your favourite titles. What would your ideal game sound like?