Closed avahe-kellenberger closed 4 years ago
This is two separate issues,
Music not playing on start on JS backend, this is a platform limitation for WebAudio to stop it autoplaying on start. It can be solved but It will require changes per game, perhaps triggering music playing after pressing a button on the title screen for example. It's not something we can really solve generically in nico without obtrusive changes, so I think the best solve is documentation.
The issue is caused by a bug in music(channel, -1)
which is fixed by @beef331's PR https://github.com/ftsf/nico/pull/29 thanks!
When compiling this project for the web, the music is not played, and the ending sound effect (when you die) is played infinitely and the game doesn't progress. This could be some other compilation related bug, that doesn't have to do with audio.
Try the game locally first to see how it should behave, because it works natively.