need help adding sound to my game

Game development with Board Game Arena Studio
Post Reply
User avatar
developgame
Posts: 107
Joined: 15 June 2020, 20:56

need help adding sound to my game

Post by developgame »

Hi Everyone,
Another newbie question here

I am developing the game Escape, the Curse of the Temple, A real time game, where the physical game uses an audio recording as the timer for rounds and end game as well and also to help create the game ambience

I like to add the audio recording to the game, I have unsuccessfully followed the "Sounds" instructions in https://en.doc.boardgamearena.com/Game_ ... amename.js so have no sound

I added the sound files, ST1begin.mp3 and ST1begin.ogg to my img/ directory ( the directory where the game images files are )

This is my .tpl, This is what I added just after the comments at the beginning of the file

Code: Select all

-->
<audio id="audiosrc_escape_ST1begin" src="{GAMETHEMEURL}img/escape_ST1begin.mp3" preload="none" autobuffer></audio>
<audio id="audiosrc_o_escape_ST1begin" src="{GAMETHEMEURL}img/escape_ST1begin.ogg" preload="none" autobuffer></audio>


<div id="outer_wrapper" class=" outer_wrapper">
in my .js I added this line exactly

Code: Select all

playSound('escape_ST1begin'); 
Can you please tell me where I have gone wrong and what I can do to have the sound files played?
Thank you for any help, advice and/or suggestions.
User avatar
RicardoRix
Posts: 2548
Joined: 29 April 2012, 23:43

Re: need help adding sound to my game

Post by RicardoRix »

I added some sounds to my project 'CChess'. You can check it out.
I remember following the same wiki and it took a bit of fiddling.
User avatar
developgame
Posts: 107
Joined: 15 June 2020, 20:56

Re: need help adding sound to my game

Post by developgame »

RicardoRix wrote: 13 October 2021, 23:50 I added some sounds to my project 'CChess'. You can check it out.
I remember following the same wiki and it took a bit of fiddling.
Thanks RicardoRix! Really appreciate your help! It really helped having your working example to follow :D

I really like your game! The sound effects really make the game come alive. I especially like the sound effects when a piece lost :lol: . Great job!
User avatar
XCID
Posts: 78
Joined: 26 March 2020, 01:45

Re: need help adding sound to my game

Post by XCID »

I wonder if it's a good idea to play an entire soundtrack in the background though. Are you planing on having a play and stop button? Not everybody likes it to be forced to listen to a specific music.

Maybe you could add it to the Melodice playlist?
User avatar
developgame
Posts: 107
Joined: 15 June 2020, 20:56

Re: need help adding sound to my game

Post by developgame »

XCID wrote: 14 October 2021, 21:04 I wonder if it's a good idea to play an entire soundtrack in the background though. Are you planing on having a play and stop button? Not everybody likes it to be forced to listen to a specific music.

Maybe you could add it to the Melodice playlist?
Thanks for your advice, XCID!

I will have the option of not having the tracks played most of the game, but still have sound to alert the impending round end.

Queen Games bundled the soundtracks with the art files, so I think I need to put them in. These soundtracks are used as the game timers and set the mood in the physical game.

I also think some players may need sounds to alert them to start returning to the home tile towards the end of each round. If their meeple is not on the home tile they would lose a die.

I would love to hear yours and others opinion about the soundtracks and anything else once I have implemented everything.

Thanks for letting me know about the Melodice playlist! This is very useful information! I might get some very interesting sounds from it :mrgreen: !
Post Reply

Return to “Developers”