CS 276 // GAME SYSTEMS IN GODOT

Sound Check

Audio, the Polish Pipeline, and Accessibility

Lucas P. Cordova, Ph.D.

Willamette University  |  Thursday, November 12, 2026

SCORE 000276HI 999999

Outline

QUEST LOG

The Sprint 2 report and peer evaluation are due tonight, 9:59 PM. The beta gate and content lock are Thursday, November 19.

CS 276
LEVEL 01

Save Point

The quest log

SCORE 000276HI 999999

Quest log

WhenWhatWhere
Tonight, 9:59 PMSprint 2 report and peer evaluationdocs/sprint-2.md; Review 2 sheets answered in FEEDBACK.md
Today, in classSprint 3 begins. It runs to the beta gateCards labeled sprint-3, each with an owner
Tue Nov 17Balancing and tuning with playtest evidenceYour numbers should live in data by then
Thu Nov 19, 9:59 PMBeta gate, Stakeholder Review 3, content lockAll content in; draft itch.io page; tag beta
Tue Nov 24Shipping: exports, release checklists, showcase prepClass meets. Fall Break starts the next day
Thu Dec 3Showcase: guests play your gameThe classroom arcade, Ford 202
CHECKPOINT

The beta requirement that today serves: real art and audio have replaced placeholders, or the placeholder is a declared choice.

CS 276
LEVEL 02

Sound Is Feedback

What audio does, and the three pieces Godot gives you

SCORE 000276HI 999999

What sound does for a game

JobThe player learnsIn Rival Brains
ConfirmThat worked. The input landedA pluck for every berry eaten
WarnSomething changed, and it is off screen or behind youTwo rising notes when the rival spots Blitz
JudgeThat was good, or that was badA falling phrase on CAUGHT, a rising one on ESCAPED
Set the moodWhat kind of place this is, and how fast to playA looping chase tune
CHECKPOINT

Week 9 called this juice: feedback that makes a mechanic readable. Sound is the feedback channel that works when the player is looking somewhere else.

CS 276

Three pieces and a wire

PieceWhat it isWhere you meet it
AudioStreamThe recording: a .wav or .ogg file, imported as a resourceThe FileSystem dock; a player's Stream slot
AudioStreamPlayerA node that plays one stream at the same volume everywhere: music, menus, pickupsThe Scene dock. Call play() on it
AudioStreamPlayer2DA player with a position. It pans left and right and fades with distance from the camera [1]A child of the thing making the noise
BusA channel every player sends its sound into. Buses are where volume is controlled for a whole group [2]The Audio panel at the bottom of the editor

Stream into player, player into bus, bus into Master, Master into the speakers. Every sound in the game takes that trip.

CS 276

Sound goes in the door

In rival.gd, the CHASE arm of the door gains one line:

State.CHASE:
    if old_state == State.PATROL:
        leash = global_position
    modulate = Color("ff2e97")
    $AlertSound.play()

In game.gd, the berry signal handler gains one line:

func _on_berry_eaten() -> void:
    berries += 1
    hud.show_berries(berries)
    berry_sound.play()
  • Week 5: a state's entry effects live in the one door every transition walks through. A sound is an entry effect.
  • The tint and the alert sit next to each other. One event, announced twice.
  • Signals already mark the moments worth a sound: berry_eaten, body_entered, pressed.
  • A sound in _process restarts sixty times a second. Play on the change.
CS 276
LEVEL 03

The Mix

Buses, volume, and a berry sound that varies

SCORE 000276HI 999999

A teammate merged the sound

MAIN.TSCN, AT DEMO9-LAP1
Main (Node2D) game.gd ├─ Maze, Player, BerryStorm ├─ Rival (rival.tscn) │ ├─ AlertSound (AudioStreamPlayer2D) │ └─ FrightenedSound (AudioStreamPlayer2D) ├─ Audio (Node) │ ├─ Music (AudioStreamPlayer, Autoplay on) │ ├─ BerrySound (AudioStreamPlayer) │ ├─ CaughtSound (AudioStreamPlayer) │ └─ EscapedSound (AudioStreamPlayer) └─ UI (CanvasLayer)
  • Six players, six streams in assets/audio/. Every one of them sends to Master.
  • The sounds were generated by a short script for this repo, so there is nothing to license.
  • It runs. It makes noise. Listen before deciding whether it is done.
LIVE DEMO

The live demo starts on the tag demo9-lap1. Tag demo9-lap2 and branch demo9 are the catch-up points. project.godot is the same on all of them.

CS 276

Listen: what is wrong?

CO-OP MODE

Thirty seconds of play, ears open. With your partner, write down three things wrong with how this game sounds. Be specific: which sound, and what about it.

Then one more: something a player would want to do about the sound that this build gives them no way to do.

I am playing. You are listening until when the rival catches me.

CS 276

What you heard

SymptomCauseFix, today
The music buries everything elseEvery player is at full volume into one busA quieter music player: the mix
The berry pluck stutters and cuts itself offOne player, one voice. Each play() restarts itMax Polyphony on the player
Twenty identical plucks in a row grateThe same recording at the same pitch, over and overA random pitch on each play
No way to turn the music down and keep the effectsThere is only Master, so there is only one knobMusic and SFX buses, then sliders
CHECKPOINT

None of these is a bug the debugger can find. The game is correct and still sounds unfinished. That gap is what polish means.

CS 276

Audio buses

DEFINITION

An audio bus is a named channel that players send their sound into. A bus has one volume, a mute switch, and optional effects, and it passes its sound along to another bus. Every project starts with one bus, Master, which feeds the speakers [2].

THE LAYOUT WE ARE BUILDING
Music player -> Music -> Master -> speakers Berry, Alert -> SFX ->
  • Bus volume is in decibels. 0 dB is full volume. Each 6 dB down sounds about half as loud [2].
  • Below about -60 dB a sound is effectively silent, so the useful range is -60 to 0 [2].
  • The layout is saved in default_bus_layout.tres. Commit it.
CS 276

Step 1: make the buses

LIVE DEMO

With demo9-lap1 open in Godot, game stopped:

  1. At the bottom of the editor, click Audio. The panel shows one strip, Master.
  2. In the top-right corner of the Audio panel, click Add Bus. A strip named New Bus appears.
  3. Click the name New Bus at the top of the new strip, type Music, and press Enter.
  4. Click Add Bus again. Rename this one SFX.
  5. Look at the drop-down at the bottom of each new strip. Both say Master: that is where each bus sends its sound.
  6. In the FileSystem dock, find the new file default_bus_layout.tres. The editor saved the layout for you.
WATCH OUT

Bus names are matched by spelling, capitals included. Write them down once and use the same two names in every scene and script.

Nothing sounds different yet. No player sends to the new buses.

CS 276

Step 2: route the players

LIVE DEMO

Still in main.tscn:

  1. In the Scene dock, open the Audio node and click Music.
  2. In the Inspector, find Bus (near the bottom of the AudioStreamPlayer section). Change it from Master to Music.
  3. Click BerrySound. Set its Bus to SFX. Do the same for CaughtSound and EscapedSound.
  4. Save the scene.
  5. In the FileSystem dock, double-click rival.tscn. Click AlertSound, set Bus to SFX. Same for FrightenedSound. Save the scene.
  6. Run the project and press Space. Click back on the editor and watch the Audio panel: the Music and SFX meters now move on their own.
PATTERN

One bus per kind of sound the player might want to turn down separately. For most games in this room: Music and SFX.

While the game runs, click the M on the Music strip to mute it and hear the effects alone. Click it again to bring the music back.

CS 276

Step 3: the mix

LIVE DEMO

Stop the game. In main.tscn:

  1. In the Scene dock, click Music.
  2. In the Inspector, find Volume dB. It reads 0. Type -10 and press Enter.
  3. Save the scene.
  4. Run the project and press Space. The berries, the alert, and the catch are all audible over the tune now.
PATTERN

Two volumes, two owners. The player node's Volume dB is your mix: how loud this sound is next to the others. The bus volume belongs to the player of the game: a settings slider will drive it.

  • Mix by ear with the game running, at the volume a stranger would play it.
  • Music sits under the effects. If a warning sound has to fight the music, the music loses.
  • Leave the bus faders at 0 dB in the editor. They are the top of the player's slider.
CS 276

Step 4: a berry sound that varies

LIVE DEMO

Stop the game. In main.tscn:

  1. In the Scene dock, click BerrySound.
  2. In the Inspector, find Max Polyphony. It reads 1. Set it to 6. Save the scene.
  3. In the FileSystem dock, double-click game.gd. Scroll to _on_berry_eaten at the bottom.
  4. Add one line above berry_sound.play(), so the function reads as shown.
  5. Save the script. Run the project, press Space, and eat a thick patch of berries.
func _on_berry_eaten() -> void:
    berries += 1
    hud.show_berries(berries)
    berry_sound.pitch_scale = randf_range(0.9, 1.2)
    berry_sound.play()
  • Max Polyphony is how many copies of the sound one player may overlap.
  • pitch_scale 1.0 is the recording as made. A small random range keeps a repeated sound from grating.

Catch-up: git checkout demo9-lap2. For a sound with several recordings, look up AudioStreamRandomizer [1].

CS 276

Nothing happened?

SymptomCause, and the cure
No sound at allThe player has no Stream, or nothing calls play(), or its bus is muted in the Audio panel (a lit M).
The music plays once and stopsThe file is not set to loop. Click it in the FileSystem dock, open the Import dock, set Loop Mode to Forward (a Loop checkbox for Ogg Vorbis), click Reimport [3].
The bus slider does nothing to one soundThat player still sends to Master, or its Bus name is spelled differently from the bus.
A teammate pulls and has no busesdefault_bus_layout.tres was never committed.
A 2D sound is silent or very quietThe AudioStreamPlayer2D is far from the camera. Use a plain AudioStreamPlayer for sounds that should ignore distance.
The music stops when the game pausesPaused nodes stop playing. Set the Music node's Process > Mode to Always in the Inspector.
CS 276
LEVEL 04

The Polish Pipeline

From placeholder to credited, final asset

SCORE 000276HI 999999

Polish is a pipeline

DEFINITION

An asset pipeline is the fixed route a sound or an image takes from wherever it came from to the running game. When every asset takes the same route, swapping a placeholder for the final version is a file copy.

StageThe ruleWhy
1. HookWire a placeholder the day the mechanic worksThe code path exists early. The final sound is a swap
2. Name and placeassets/audio/, named for the event: berry.wav, alert.wavReplacing the file keeps every scene pointing at it
3. ImportSet looping and format in the Import dockImport settings travel with the repo, in the .import file
4. MixSet the player's Volume dB with the game runningFiles from different sources arrive at very different levels
5. CreditAdd the line to CREDITS.md before the commitNobody remembers where a sound came from three weeks later
CS 276

Files and formats

WAVOgg Vorbis
Use it forShort, repeated effects: hits, pickups, clicksMusic, speech, long ambience [3]
BecauseCheapest to play. Many can overlap at no costMuch smaller file. Costs a little to decode
LoopingImport dock: Loop Mode, then ReimportImport dock: Loop, then Reimport
Watch forSilence at the start of the file makes the sound feel lateA loop that clicks at the seam
  • The export from next week's lecture packs every imported file into the game. A three-minute WAV music track is tens of megabytes on your itch.io page.
  • Trim leading silence in any audio editor, or turn on Trim in the WAV import settings [3].
CS 276

Every asset has a license

SourceWhat you oweExamples
You made itNothing. Say so in the creditsjsfxr or ChipTone for retro effects; your own recordings
CC0 (public domain)Nothing required. A credit line is good mannersKenney audio packs; CC0 sounds on Freesound
CC BYA credit line with the author and the licenseMuch of Freesound and OpenGameArt
Generative AIDisclosure in the submission and in the game's creditsPer the syllabus
Ripped from a game, a film, or a songYou cannot use itAn academic honesty violation in this course
QUEST LOG

The syllabus rule: every asset your team did not create is credited in the game and listed in the repository. The Canvas Resources page has the vetted sources and a license cheat sheet.

CS 276

The polish pass

OrderAskTypical fix
1Does every player action answer back?A sound and a visual on jump, hit, pickup, button press
2Does every state change announce itself?An entry effect in the door: enemy alerts, power-ups, win, loss
3Do the screens connect?Title, pause, win, and loss all reachable and all leavable
4Is it consistent?One font, one palette, sounds at matching levels
5Is anything still a grey box or silent by accident?Swap it, or declare it a choice in the README
CHECKPOINT

Each answer of no is an issue labeled polish. Work the list from the top: the first two rows are what a stranger notices in the first ten seconds.

CS 276
LEVEL 05

Play for Everyone

The basic accessibility list, and a settings panel that saves

SCORE 000276HI 999999

Accessibility is removing barriers

DEFINITION

A game is accessible when a player's body, senses, or situation does not lock them out of it. The barrier is in the design, so the design can remove it [4].

PermanentTemporarySituational
SeeingColor blindness, low visionDilated pupils after an eye examA laptop screen in sunlight
HearingDeaf or hard of hearingAn ear infectionA loud room. A muted laptop
MovingOne hand, a tremorA wrist in a castA coffee in the other hand
  • About 1 in 12 men have a color vision deficiency [5]. In a room of showcase guests, that is several players.
  • The right-hand column is December 3: a noisy classroom, strangers, and laptops they have never touched.
CS 276

The basic list

Guideline [6]In GodotCost
Separate volume controls for effects and musicTwo buses and two slidersToday
No essential information by sound aloneEvery warning sound gets something on screenOne line
No essential information by a fixed color aloneA symbol, a shape, or a word next to the tintOne line
An easily readable default font sizeBigger theme font sizes; an option for bigger stillMinutes
Allow controls to be remappedYou have used input actions since week 2. InputMap can change them at run timeAn afternoon
An option to adjust the game speedEngine.time_scaleOne line
All settings are saved and rememberedConfigFile at user://Ten lines

These are from the Basic tier of the Game Accessibility Guidelines: wide reach, low cost, right for almost any game.

CS 276

Two channels

match new_state:
    State.PATROL:
        modulate = Color.WHITE
        $StateLabel.text = ""
    State.CHASE:
        if old_state == State.PATROL:
            leash = global_position
        modulate = Color("ff2e97")
        $StateLabel.text = "!"
        $AlertSound.play()
    State.RETURN:
        modulate = Color("8f8ab0")
        $StateLabel.text = "?"
    State.FRIGHTENED:
        modulate = Color("478cbf")
        $StateLabel.text = "~"
        $FrightenedSound.play()
PATTERN

Every signal the player needs to survive goes out on two channels. Then losing one channel (to color blindness, to a muted laptop, to a loud room) leaves the other.

StateTintSymbolSound
PATROLwhite
CHASEmagenta!alert
RETURNgrey?
FRIGHTENEDblue~wobble

rival.gd on demo9. StateLabel is a Label child of the Rival, above its head. Three new lines in the same door.

CS 276

settings.gd: apply

func _apply() -> void:
    _set_volume("Music", music_slider.value)
    _set_volume("SFX", sfx_slider.value)
    get_tree().call_group("hud", "set_big_text", big_text.button_pressed)
    Engine.time_scale = 0.7 if slow_mode.button_pressed else 1.0

func _set_volume(bus_name: String, amount: float) -> void:
    var bus := AudioServer.get_bus_index(bus_name)
    AudioServer.set_bus_volume_db(bus, linear_to_db(amount))
    AudioServer.set_bus_mute(bus, amount <= 0.0)
  • A slider runs from 0 to 1, which is how people think about volume. linear_to_db() converts it to the decibels a bus wants.
  • At 0 the bus is muted outright.
  • call_group again: the panel does not know where the HUD lives. Anything in the hud group with a set_big_text method hears it.
  • Engine.time_scale = 0.7 slows the whole simulation. Audio keeps its normal speed.
DEFINITION

settings.gd sits on a VBoxContainer inside the pause menu: two HSliders and two CheckButtons.

CS 276

settings.gd: remember

const PATH := "user://settings.cfg"

@onready var music_slider: HSlider = $MusicRow/MusicSlider
@onready var sfx_slider: HSlider = $SfxRow/SfxSlider
@onready var big_text: CheckButton = $BigText
@onready var slow_mode: CheckButton = $SlowMode

func _ready() -> void:
    var file := ConfigFile.new()
    file.load(PATH)   # no file yet is fine: every get below has a default
    music_slider.set_value_no_signal(file.get_value("audio", "music", 1.0))
    sfx_slider.set_value_no_signal(file.get_value("audio", "sfx", 1.0))
    big_text.set_pressed_no_signal(file.get_value("access", "big_text", false))
    slow_mode.set_pressed_no_signal(file.get_value("access", "slow_mode", false))
    _apply()
func _on_changed(_value: Variant = null) -> void:
    _apply()
    var file := ConfigFile.new()
    file.set_value("audio", "music", music_slider.value)
    file.set_value("audio", "sfx", sfx_slider.value)
    file.set_value("access", "big_text", big_text.button_pressed)
    file.set_value("access", "slow_mode", slow_mode.button_pressed)
    file.save(PATH)
  • user:// is a per-player folder outside the project. It survives quitting, and it works in the exported game.
  • Every get_value carries a default, so the first run (no file) just works.
  • The _no_signal setters load the controls without firing a save.
  • Every change applies and saves at once. There is no Apply button to forget.
CS 276

Small switches

In hud.gd, the method the settings panel calls through the group:

func set_big_text(on: bool) -> void:
    for label in [time_label, berry_label, best_label]:
        label.add_theme_font_size_override("font_size", 44 if on else 28)
PAUSE_MENU.TSCN, ON DEMO9
PauseMenu (ColorRect) Process Mode: Always └─ Center / Menu ├─ ResumeButton, RestartButton └─ Settings (VBoxContainer) settings.gd ├─ MusicRow / MusicSlider ├─ SfxRow / SfxSlider ├─ BigText, SlowMode (CheckButton) └─ Preview (plays on the SFX bus)
  • The menu works from the keyboard alone: Resume grabs focus, arrows move, the same keys that play the game.
  • The options live where the player already is: the pause menu, one key away, mid-game.
  • Defaults first. A readable font and a second channel help everyone and need no menu.
CS 276
LEVEL 06

Build-Along

Two buses and one option in your game, in twenty minutes

SCORE 000276HI 999999

Pick your option

Everyone builds the two buses. Then each team picks one row:

Your alphaBuild this
Has sound alreadyA Music and an SFX slider in your pause or title menu, driving the buses
Is silentThree hooked sounds from the Resources page: one confirm, one warn, one judge. Credit them
Tells the player something by color aloneA second channel: a symbol, a shape, a word, or a sound
Has small HUD text, or asks for fast reactionsA big text toggle, or a slow mode toggle
CO-OP MODE

Teams work in the team repo. One laptop builds the buses and routes the players; the other starts the option. Say your row out loud before the timer starts.

CS 276

Co-op: two buses, one option

CO-OP MODE

Twenty minutes, on the timer:

  1. Audio panel: add a Music bus and an SFX bus.
  2. Set Bus on every audio player in every scene. Commit default_bus_layout.tres.
  3. Mix: with the game running, bring the music player's Volume dB down until the effects read clearly.
  4. Build your one option. settings.gd on the rival-brains demo9 branch is yours to copy.
  5. Open an issue for each thing you found and did not fix, labeled polish or a11y.
  6. Round clear: show me the Audio panel with both meters moving, and your option working.

Stuck? The Nothing happened? slide, then a hand up.

CS 276

Round clear

  • Every game in the room now has a mix that one person chose on purpose, and a knob for the person playing.
  • The option you built is the first line of an Accessibility section on your itch.io page. Players look for it.
  • The issues you opened go on the Sprint 3 board. A second channel for a warning is a ten-minute card.
  • At Stakeholder Review 3, ask one stakeholder to play a minute with the laptop muted. Watch what they miss.
CHECKPOINT

Two buses, a mix on the players, sliders on the buses, every signal on two channels, and settings that save.

CS 276
LEVEL 07

Studio

Sprint 3 begins

SCORE 000276HI 999999

Sprint 3 planning

CO-OP MODE

The rest of class is yours. Both laptops on the team repo. Sprint 3 is one week long and ends at content lock. The Sprint 2 report, due tonight, quotes the Sprint 3 board in its last section.

Beta asks forOn your board as
All content in: every level, enemy, menu, and asset that will shipOne card per missing piece, each with an owner. Anything else is cut today
Real art and audio in place of placeholdersThe polish cards from today, top two rows of the polish pass first
The full flow: title, play, win and loss, and a way backA card for each screen that is missing or a dead end
A first balance pass, with the numbers in dataTuesday's lecture. Move constants to @export before then
A draft itch.io page with a build uploadedOne card, one owner, started this week

I am walking the room. Flag me down for anything stuck.

CS 276
LEVEL 08

Game Over Screen

What you know now

SCORE 000276HI 999999

Checkpoint reached

CHECKPOINT
  • Sound is feedback: it confirms, warns, judges, and sets the mood. Play it on the change, in the door or on the signal.
  • Stream into player, player into bus, bus into Master. One bus per kind of sound a player would turn down separately.
  • The player node's volume is your mix. The bus volume is the player's setting.
  • Polish is a pipeline: hook a placeholder early, name it for the event, import, mix, credit.
  • Accessibility removes barriers. Every essential signal goes out on two channels.
  • Settings apply at once and are saved. Good defaults come before options.
QUEST LOG

Tonight, 9:59 PM: Sprint 2 report and peer evaluation. Tue Nov 17: balancing and tuning. Thu Nov 19: the beta gate, Stakeholder Review 3, and content lock.

CS 276

Sources

  • [1] Godot docs: Audio streams (AudioStreamPlayer, AudioStreamPlayer2D, AudioStreamRandomizer).
  • [2] Godot docs: Audio buses (the decibel scale, the Master bus, default_bus_layout.tres).
  • [3] Godot docs: Importing audio samples (WAV and Ogg Vorbis, Loop Mode, Trim).
  • [4] Microsoft Inclusive Design: Inclusive 101 (permanent, temporary, and situational). inclusive.microsoft.design
  • [5] National Eye Institute: Color Blindness. nei.nih.gov
  • [6] Game Accessibility Guidelines, Basic tier. gameaccessibilityguidelines.com/basic
  • [7] Godot docs: ConfigFile and AudioServer class references; Pausing games and process mode.
  • [8] Demo repo: github.com/LucasCordova/rival-brains, branch demo9, tags demo9-lap1 and demo9-lap2.
CS 276