amethyst / evoli

An ecosystem-simulation game made with Amethyst
https://community.amethyst.rs/t/evoli-introduction/770
Other
217 stars 33 forks source link

Add looping background music #35

Closed nicklasmoeller closed 5 years ago

nicklasmoeller commented 5 years ago

I did a naive attempt at adding background music, by simply taking what was done in the pong tutorial.

I'm not really that familiar with Amethyst (nor with gamedev), since I only went through the pong tutorial myself two weeks ago.

I took the liberty to convert the m4a from the forum to ogg, since that's what the pong tutorial is using, and m4a isn't supported by amethyst-audio, by running

ffmpeg -i input.m4a -acodec vorbis -strict -2 -aq 60 -vn -ac 2 output.ogg

I also took it upon myself, to decide that lowering the volume to 25% would be good here, since the playback is pretty loud for an ambient cosy track IMO.

However, I wasn't sure where to place the audio module, but seemed like the resources folder was the best option, although not considering what resources are in specs, but merely looking at what was there before (although I'm assuming this is correct, since it seems to me that this instance of audio would be classified as a resource, also in specs terms)

I'm open for all kind of feedback and request for changes.

Solves https://github.com/amethyst/evoli/issues/26