Just curious. Can you add background songs to your game to help set the tone and ambience of a scene? Do you think it would be nice for the player like in a movie or narrative audio, or would it just annoy them and break immersion?
Also, I have another question which I really should make another topic for, but I love to encourage discussion, so. How well would an anime-themed game fare with the CoG fanbase/audience? I want to make Hunter Sky more anime like in a way.
Yessir, you can use the *sound command. Check out the documentation here:
Just so you donāt have to experiment and find out for yourself
Sounds will continue to play until they are finished
Sounds will continue even if you press Next, make a choice or if you change scenes
If youāre on a page where a sound starts and you open-close the stats menu- the sound with abruptly start again
To stop a sound, you type *sound and nothing else on that line- OR you let the sound finish
You canāt change the volume of a sound
Sounds wonāt loop
You canāt create a playlist or check when a song has ended, which sucks.
If you want to play songs one after another, you have to merge them into one file
Some people might be playing with their own music on in the background, so sounds might be annoying for them- if you really want to play sounds, maybe have it as an option you can turn on and off in the stats menu?
Something like a true/false variable, before you play the sound check if variable is true (aka "I want to play songs), if it is, the sound is played.
If you want to control how loud a sound is then youāll need to have multiple copies of it- all at different volumes. Switch the sound control true/false variable to a number- where 0 is off, and then 1 to whatever number you want for max determines which āvolumeā of sound you want to play.
-Edit-
Oops, meant to go to a new line but posted early by mistake
Oh there are a bunch of anime stories, weāve got a Samurai oneā¦ A Mage Reborn uses anime art, Fatehaven too. Theyāre all popular.
A lot of people donāt want that, Iāve seen this discussion before. Not to mention people who use screenreaders. So if you do include sound, add an option to turn it off. Then in the code, guard the call to the *sound command with an *if statement.
ChoiceScript offers almost no control over the sound, you canāt pause and resume or play multiple tracks at the same time. So thereās not much room for getting creative with sounds like that.
my biggest complain over it is the lack of audio control. I played a WIP recently that has it (Path of Martial Arts) and while it doesnāt detract, it distracts. If I could just make it a bit more quiet, I could probably get into it. Until then, Iāll probably just stick to having some ASMR running while I read.
Oh wow cool! I didnāt know this was possible with choice script. Awesome!
I was hoping to add some ambient music like forest noises or beach sounds to fit the scenes, and sad instrumental songs(no lyrics) for sad scenes and intense ones. I really am impressed with how much one can do with Choicescript.
Does anybody know if adding sound into a game has been a choicescript feature since itās creation, or has it been implemented along the way? Seems like a cool aspect of code that should be made known to more authors who want more interesting mechanics in their games.
Also, another game that uses sounds (and gives the option to turn them off) is @Franzinyte ās lovely Dear Diary, We Created a Plot Hole, still a WiP. So you definitely wouldnāt be alone in adding sounds to your game.
Well, Trial of the Demon Hunter was released in 2014 (9 years ago!), which was about 3 years after CoG was founded, I think? So Iād guess the *sound command has been a thing since the birth of choicescript. Itās about time that it starts catching on in more games!
Hard agree. Plus it can make the wip lag, big files. Also, music (and even some sounds) are SO taste-specific; more than even ROs. One person may hear birdsong and angels while another hears nails on chalkboards.
Personally I generally dislike sound tracks being played over books. Sometimes for specific projects it can work, but for longer books I generally find it really distracting. While you can do it, thereās a lot of downsides as people have discussed like the reader not being able stop and start it, no looping of audio, large files etc. If you really want to add sounds, twine is the more versatile platform for it.
On top of what other people have said, thereās also the possibility it might be wasted effort if people play without audio (itās text-based, after all) like me.