Skip to content

[Feature] Audio: sound playback and spatial audio #1242

Description

@miogds

Goal

Sound in games built on Untold: a siren that wails from where it stands, footsteps and impacts triggered by gameplay, ambient loops per area, music, all positioned in space so on the headset a sound comes from the entity that makes it. The engine has no audio system today; CoolBowling synthesizes its own sounds through AVAudioEngine inside the demo, and every game would have to do the same.

The goal is an audio component and system in the engine: an AudioSourceComponent on an entity with a clip, volume, pitch, loop and spatial settings, a listener that follows the active camera or the headset, playback through AVAudioEngine with spatial mixing (and PHASE on visionOS where it fits), one-shot and looping playback from Swift and from the script system (issue #1241), clips as assets in the project the editor can assign and preview, and saved with the scene.

Status

Step Plan Status
Requirements Formats, spatialisation per platform (AVAudioEnvironmentNode, PHASE), mixing groups (music, effects, voice), budget Not started
Runtime Audio source and listener components, playback and mixing, events for physics contacts and animation Not started
Editor Assign and preview clips in the Inspector, volume and loop settings Not started
Scripting Play, stop and set volume as script actions Not started
Sample The siren and impact sounds in one of the demos Not started

Next steps

  • Requirements note, then the runtime with one-shot playback: the script system's sound action needs it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions