Adventuron supports sound / music and sfx playback (in different channels).
The Opposite Edge of Slumber used these commands in the previous jam.
These features are NOT 8-bit export compatible.
You can also use relative paths for referencing your sound effects, but you would need to compile your game to the folder containing (or parent folder of a subfolder containing) the mp3 files to test them out (or use http or https) during development.
I haven't documented all the sound commands in the cookbook (yet). I'll do it tomorrow. But the six commands you should be using are
- play_sound
- play_ambient
- play_music
- stop_sound
- stop_ambient
- stop_music
So far, there is only one channel per sound category so playing a different music will stop the previous music.
start_at = river locations {
river : location "You are in the river.\n" ;
} on_tick {
: if (is_just_entered () ) {
: if (is_at "river") {
: play_music sound="song_river";
}
: else {
: stop_music;
}
}
} assets {
sounds {
// NOTE :: Make sure that only reference content you are
// licensed to use. // ALSO :: You can use relative paths here, but you can only
// test in compiled versions of your code (not the
// web editor)
song_river : sound_sample "https://somedomainid.com/sounds/river.mp3" ;
}
}