From 2e0df459a5a73c58ea86f5e2d9c890533b262f66 Mon Sep 17 00:00:00 2001 From: Evan Pratten Date: Sat, 18 Apr 2020 16:16:24 -0400 Subject: [PATCH] Add explination of howler rw --- _drafts/2020-04-20-LudumDare46.md | 14 +++++++++++++- assets/images/settings-screen-ld64.png | Bin 0 -> 1069 bytes 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 assets/images/settings-screen-ld64.png 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 0000000000000000000000000000000000000000..072f006a07ed2801227b08eed0ef7542d5122c4f GIT binary patch literal 1069 zcmeAS@N?(olHy`uVBq!ia0vp^2Z4A$2NRGy!J%ITq?n7HJVQ7*IBq}me*ol4mbgZg z1m~xflqVLYGNk9_=ceiwCl{rr<`rk;m%L}*ZwJ(Jz|+Msq+-t7yN*GRq9htF{#Ygc z$YJ`URk2*c<(Kjwuvn|a{pfJ8Nxu|Z!gcW1kKbx4A545NoA~PM>kG#`Isa$b;fDo9 zm#<&H-Yb9RY>&;;^SNbzym#E_Y}>(p{`~pvbsYbH{rF)~`Fna>-9zu(Kbra9vvgzbAO3Ip$&{4&vS82CKTEgO+27AI{@2{Kv^p-zwKu2o z&-&@U3zputUw-bAS+qg>ig|YbE$(fXpKs`WEq=%G+X4( zsq>86SNO@uKayJ`BR@;NdEWVX6LZf!{UH!tIcwSe%O-pG*u3&P7-xH7r~EU4sckDv zT$UDRL9K_48>D6T50oq77=Od0v4yq9n9Eqwi!TlmHG zO>&E*e*IZkoPOr0c=@Lepep_6hV!a*|1SU9ZGCZs&pCb~%x{i=?OOhW z7Uic8$^2q`CJ=q|L$Q5bk?j#)peNJg^X-%DN_`f~0$p8JG|{U680WR|C$ zJ(1p!bK}C+bLXC&(>2@jZ|nWz+vopoz4NBW)b#43^y6#JPyNZV>ust1xs&@9i#xJj zM7=E5trgVUox&HmwD$Mc&eZ*HrUT>C?5EH9*Z26#&&e$MG?O>x(T~4IK-KE+Z~s2i z*4x8VQ4Dew$SGI-u3gDVNl8B{gXS)%JS?E09zl2guv7J_et~Ov{1buOD!>fS;OXk; Jvd$@?2>`d``WOHJ literal 0 HcmV?d00001