diff --git a/_drafts/2020-04-20-LudumDare46.md b/_drafts/2020-04-20-LudumDare46.md index 9d4db0d..f358984 100644 --- a/_drafts/2020-04-20-LudumDare46.md +++ b/_drafts/2020-04-20-LudumDare46.md @@ -49,7 +49,19 @@ I also started out by writing a sound system that uses audio channels to separat - When queueing audio, the 2 most recent requests are always ignored - Some browsers do not allow me to play multiple audio streams at the same time -Due to these issues, I decided to rewrite the audio backend to use [Howler.js](https://howlerjs.com/). I streamed this rewrite [on Twitch](). +Due to these issues, I decided to rewrite the audio backend to use [Howler.js](https://howlerjs.com/). I streamed this rewrite [on Twitch](). The Howler rewrite was very painless, and made a much nicer interface for playing audio assets. + +```js +// The old way +globalSoundContext.playSound(globalSoundContext.channels.bgm, soundAssets.debug_ding); + +// The new way +soundAssets.debug_ding.play(); +``` + +This rewrite also added integration with the volume control sliders in the game settings menu (don't mind the spelling mistake): + +![Settings menu](/assets/images/settings-screen-ld64.png) diff --git a/assets/images/settings-screen-ld64.png b/assets/images/settings-screen-ld64.png new file mode 100644 index 0000000..072f006 Binary files /dev/null and b/assets/images/settings-screen-ld64.png differ