Skip to content

Sounds

Game sounds

You must upload all sounds used in your game interface to the sounds directory.

Sound format requirements

Sound files should use the MP3 or OGG format.

For sounds to be deployed correctly, their filenames should not contain spaces or special characters.

Sound loading

Be careful: by default, ALL sounds at the root of your sounds directory are loaded in each player's browser when they load the game. Avoid putting unused sounds there, as they will slow down loading. Sounds in subdirectories of sounds are not preloaded by default, so you can use subdirectories for sounds that are only needed when an expansion is enabled, for example.

You can control how sounds are loaded with the JavaScript methods preloadSounds and dontPreloadSounds (see https://en.doc.boardgamearena.com/Game_interface_logic:_Game.js#Sounds). For example, you can use preloadSounds to load sounds from a subdirectory when an expansion is enabled.

Debugging

In your browser's developer console, run document.querySelectorAll('audio') to list the audio elements preloaded by the framework.