browser-game-audio
/browser-game-audio
Use for HTML5 Web Audio SFX playback, buses, spatial sound, autoplay unlock, pause and voice limits; not adaptive composition.
- Author
- PixelWao ↗
- Repository
- codex-gamedev-skills ↗
- Licence
- MIT
- Last repository change
- 30.10.2026
Assessment and security
- Files in this package
- 16
- Scripts
- 3
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 30.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
- 3 scripts in this package. Review them before installing, as Claude may execute them.
Scripts: examples/integrate.mjs, scripts/audio-engine.mjs, tests/audio-engine.test.mjs
What it does and when to use it
Use for HTML5 Web Audio SFX playback, buses, spatial sound, autoplay unlock, pause and voice limits; not adaptive composition.
Original author description
Use for HTML5 Web Audio SFX playback, buses, spatial sound, autoplay unlock, pause and voice limits; not adaptive composition.
How it works
- Mission and activation
- Non-negotiable integration rules
- Workflow for Codex
- Files and live entrypoints
- Commands
- Limits / honesty
SKILL.md preview
--- name: browser-game-audio description: Use for HTML5 Web Audio SFX playback, buses, spatial sound, autoplay unlock, pause and voice limits; not adaptive composition. --- # Browser Game Audio — runtime integration ## Mission and activation Create or repair browser game sound playback, buses, SFX, spatial events, mobile unlock/pause and voice budgets. Do not implement music composition/scheduling (see `adaptive-music-systems`) or claim loudness compliance (see `audio-mixing-qa`). ## Non-negotiable integration rules 1. Inspect game bootstrap, existing sound library, AudioContext ownership, input gesture, event bus, build tooling and browser support *before coding*. 2. Reuse the existing audio graph unless user explicitly approves replacing it. An existing renderer/game loop and physics system must remain untouched. 3. Unlock/resume AudioContext from an actual user gesture; no background auto-play promises. Provide user mute and independent music/SFX controls. 4. Use ONE AudioContext where possible; never close a context you do not own. 5. AudioBufferSourceNode is one-shot: create a new node for each playback; cache decoded AudioBuffers, not started source nodes. Limit simultaneous voices. 6. Avoid loading untrusted URLs without checking response status, decode errors and cross-origin restrictions. Include loading fallback and UI failure path. 7. Do not execute expensive audio processing on each animation frame. Use AudioParam automation, and schedule at AudioContext.currentTime. ## Workflow for Codex - **Audit:** locate callers, audio ownership, browser targets, bus volumes, high-frequency collision event sources, test runner and performance budgets. - **Plan:** state scope and constraints; define `music/sfx/ui/ambience/voice` bus routing and a conservative global voice budget; do not enforce arbitrary platform-specific limits without profiling. - **Integrate:** adapt `scripts/audio-engine.mjs` into existing service or use example `examples/integrate.mjs`. Inject existing AudioContext; leave physics, rendering, routing and save systems owned by the game. - **Test:** unlock blocked/allowed, mute/volume persistence, paused state, repeated collision bursts, mobile voice cap, spatial position, long-running remove/restart. Always separate simulated Web Audio tests from speaker tests. - **Report:** before/after regression evidence, browser/device matrix and exact untested items. Attach `assets/INTEGRATION_CHECKLIST.md` checklist. ## Files and live entrypoints - `scripts/audio-engine.mjs`: runtime with injected AudioContext, five buses, exact mute, independent duck gain, buffer cache, capped voices, optional HRTF. - `scripts/audio-engine.d.mts`: TypeScript API declaration. - `examples/integrate.mjs`: minimal game event integration (not a new game loop). - `examples/offline-browser-smoke.html`: run on localhost to test Web Audio path. - `tests/audio-engine.test.mjs`: Node test suite, including mock API behavior. - `references/browser-lifecycle.md`: autoplay, mobile, failure and privacy. - `references/bus-and-sfx.md`: mix graph, gamefeel and limits. ## Commands ```bash node --test tests/*.test.mjs tsc --project tsconfig.json ``` ## Limits / honesty `OfflineAudioContext` render proves graph output, not audible quality, output latency, clipping through OS mixer, real stereo imaging or mobile compatibility. Do not generate claims of sample-accurate measured delivery from JavaScript wall-clock timestamps alone.
Files in this package (16)
- CHANGELOG.md 1 KB
- LICENSE 1 KB
- PROVENANCE.md 2 KB
- SKILL.md 3 KB
- tsconfig.json 1 KB
- assets/INTEGRATION_CHECKLIST.md 1 KB
- attribution/upstream/LICENSE 11 KB
- attribution/upstream/NOTICE 1 KB
- examples/integrate.mjs 1 KB
- examples/offline-browser-smoke.html 1 KB
- examples/typed-example.mts 1 KB
- references/browser-lifecycle.md 1 KB
- references/bus-and-sfx.md 1 KB
- scripts/audio-engine.d.mts 1 KB
- scripts/audio-engine.mjs 8 KB
- tests/audio-engine.test.mjs 4 KB
Versions
The database has no other skills named browser-game-audio.
Database snapshot: 13.11.2026 · package version 98f261573338 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 4 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100game-audio
Game audio engineer using Web Audio API for procedural music and sound effects in browser games. Zero dependencies. Use when adding music or SFX to a game. - 100add-audio
Add music and sound effects to a game using the Web Audio API — background music, gameplay themes, and SFX. Zero dependencies. Use when the user says "add music", "add sound effects", "add audio", "make it sound good", "add BGM", or "add SFX to my game". Do NOT use for gameplay… - 100audio
Implement audio in Godot including sound effects, music playback, audio buses, and 3D spatial audio. Use this skill when setting up audio players, managing audio buses, creating music systems with crossfade, pooling audio sources, or adding positional audio to 2D/3D scenes. - 100audio-system
Use when implementing audio — audio buses, AudioStreamPlayer, spatial audio, music management, SFX pooling, and dynamic mixing - 95web-audio-api-synthesis
Design and implement low-latency browser audio synthesis, sound effects, audio node graphs, convolver reverbs, and custom AudioWorklet processors using the W3C Web Audio API. Trigger when building interactive web synthesizers, in-browser audio editors, sound engines for games,… - 100harmony-audio
Add sound and music to a web game - a Web Audio engine with volume buses, sound effects with variation and voice limits, gapless and layered music, ducking, 2D and 3D sound, pausing for hidden tabs and the Harmony overlay, mixing, and licensed sources. Use when a game needs…