Proving Grounds: 3D Platformer Mechanics Support: GitHub issues

Sound: volume, sound keys and swapping sounds

Everything in the kit that makes a noise asks for a sound key (Jump, Break_Metal, BossServo ...). The active theme turns each key into a sound. You never touch code: volume is a Sound Mix, sounds are a map in a theme asset.

1. Volume control: Sound Classes and the Sound Mix

All sounds are classed, so one setting controls a whole group.

SC_Master
  SC_SFX        hero, crates, enemies, bosses, hazards
  SC_UI         menu focus / press, level end
  SC_Ambience   ambience loops per map
  SC_Music      music

They live in /PlatformerKit/Audio/Mix. The Sound Mix SCM_CorridorVolumes has one adjuster per class (volume and pitch), so it is the one place to turn a group up or down.

No project setting needed. When play starts, the game mode sets SCM_CorridorVolumes as the base Sound Mix (BP_GameMode > Details > Base Sound Mix). Point that field at your own Sound Mix to use yours, or clear it to keep your project's Default Base Sound Mix (Project Settings > Engine > Audio).

Optional, for your own sounds: Project Settings > Engine > Audio > Default Sound Class = SC_SFX puts sounds that have no class into the SFX group.

Change the mix - In the editor: open SCM_CorridorVolumes, change Volume Adjuster on a class. - In your game (Blueprint): Push Sound Mix Modifier (SCM_CorridorVolumes) at start, then Set Sound Mix Class Override (Sound Class SC_Music, Volume 0.5, Fade In Time 0.2) from an options menu slider. - Per sound: every key also has its own Volume in the theme (section 3).

Loudness: the shipped sounds are normalised per group (hero, crate, enemy, boss, UI, explosions, loops, ambience), so raise or lower the class and not single files.

Concurrency (how many copies of a sound may play at once). Assets in /PlatformerKit/Audio/Mix:

Asset Limit When the limit is reached Used by
SCON_CrateBurst 6 voices stops the oldest, minimum 0.02 s between starts crate breaks and bounces (a stack of crates does not turn into noise)
SCON_Loop 2 new one is not started rail grind, wall run and other loops
SCON_UI 2 stops the oldest menu sounds

Attenuation: ATT_BossSfx (inner radius 1500 cm, falloff to 5000 cm) is used by boss part sounds so a boss is loud close by and quiet far away. Edit the radius there; open a sound wave and change Attenuation Settings to use another asset.

2. Sound keys

A key is a plain name. The kit plays it for the event:

Group Keys (examples)
Hero Jump, Slide, SlamStart, Slam, Death, Death_<kind> (for example Death_Fall), Respawn, GlideLoop
Footsteps Footstep; a floor with the physical material PM_Grass plays Footstep_Grass where it exists, otherwise Footstep (also _Wood, _Metal, _Felt)
Traversal WallRunIn / WallRunLoop / WallRunOut, RopeIn / RopeLoop / RopeOut, RailLand, RailGrind, RailHang, RailTransfer, mounts <Prefix>Start / End / Launch
Powers PowerOn_<Power>, PowerLoop_<Power>, ... with <Power> = Phase, Cyclone, TimeSlow, Gravity, Glide. A key without _<Power> is the fallback.
Crates per type, section 4
Enemies EnemyStomp, EnemySpun, EnemyShoot, EnemyChargerWindup, EnemyShieldUp ...
Pickups and level end Loot, Gem, ExtraLife, LevelEndAppear, LevelEndReward ...
Boss BossHit, LaneShot, MissileLaunch, MissileImpact, BossServo, BossServoFast, BossTelegraph, BossSpinUp, BossPartEject, BossDefeat
UI FocusSound, PressSound are set on the UI style asset, not in the theme
Music and ambience theme Music; each level places an Ambient Sound for its ambience

The complete list is the Sounds map of the shipped theme: open it and scroll. A key that the theme does not contain is silent (the Output Log prints sfx: the theme has no sound for <key> once).

3. Swap a sound in a theme

Themes live in /PlatformerKit/Themes (DA_Lab_Course is the theme of the demo courses). Never edit the shipped theme: duplicate it first.

  1. Import your .wav into your own folder (Content Browser > drag the file in).
  2. Duplicate the theme into your folder and keep the original as a reset point.
  3. Open your theme > Sounds. Find the key (for example Jump) or press + to add one.
  4. Open the entry: Variants = your Sound Wave or Sound Cue (several = picked at random), Volume = 1.0.
  5. In BP_Control > 3 Theme of the level select your theme. Restart Play.

Sound Waves that you add should be assigned a Sound Class (SC_SFX for effects) so the volume control of section 1 reaches them. Optional: set Concurrency to SCON_CrateBurst for crate-like sounds.

To change the music: Music and Music Volume in the same theme.

4. Crate sounds: per type, with a fallback

Crates look for a key for their own type first and fall back to the generic one:

Event Looks for first Falls back to
Break Break_<Type> Break
Bounce Bounce_<Type> Bounce
Metal bounce BounceMetal_<Type> BounceMetal

<Type> is the crate type name. The 16 types are Basic, Surprise, Bounce, Arrow, Strong, Metal, NBounce, Switch, Outline, Detonator, Fuse, BigOrb, Volatile, Time, Checkpoint and Shield.

The Lab theme has a different Break_<Type> for nine types and Bounce_<Type> / BounceMetal_<Type> for the bouncing ones. Fuse, detonator and volatile crates use FuseBeep, Explosion, Detonator, CrateSwitch and VolatileHop.

Give one crate type its own sound: add Break_Metal (for example) to your theme and fill it. Delete the key and the crate plays the generic Break again, so you never have to fill all 16.

5. Boss part sounds

Every boss body move has an Sfx field: a sound key, played when the move starts. Set it in the boss Blueprint (BP_Boss_Machinist, BP_Boss_Engine or your own): Parts > (part) > Moves > (move) > Sfx. The key must exist in the theme's Sounds map. To change what a move sounds like, either change the key in the move, or change the sound behind the key in a theme. Boss sounds use the ATT_BossSfx attenuation, so they follow the boss's position. See BOSS_BODY.md.

6. Quick answers