Is it Possible to Change Music During Gameplay?

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
User avatar
fazzasx
Posts: 104
Joined: Mon May 27, 2013 12:35 am

Is it Possible to Change Music During Gameplay?

Post by fazzasx »

Hi Everyone,

I wanted to ask if its possible to change the music during gameplay using either playsound or something?

Reason for asking is it would be cool to have some sort of danger music or scene or area specific music play to change the mood and feel as music and sound play a key role in the atmosphere of the game itself.

Let me know if anyone has achieved or tried this yet!

Thanks
User avatar
msyblade
Posts: 792
Joined: Fri Oct 12, 2012 4:40 am
Location: New Mexico, USA
Contact:

Re: Is it Possible to Change Music During Gameplay?

Post by msyblade »

You could use playSound to do it with very large .Wav files, it would just be up to you when they are triggered. The bad news is you will have no manual way of stopping a playing sound, so you are going to have large gaps of silence or overlapping music, because you cannot determine precise timing of each player. And the file size of doing wav's that last several minutes makes it nearly prohibitive to do. sorry!
Currently conspiring with many modders on the "Legends of the Northern Realms"project.

"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades
User avatar
fazzasx
Posts: 104
Joined: Mon May 27, 2013 12:35 am

Re: Is it Possible to Change Music During Gameplay?

Post by fazzasx »

msyblade wrote:You could use playSound to do it with very large .Wav files, it would just be up to you when they are triggered. The bad news is you will have no manual way of stopping a playing sound, so you are going to have large gaps of silence or overlapping music, because you cannot determine precise timing of each player. And the file size of doing wav's that last several minutes makes it nearly prohibitive to do. sorry!

Thanks msyblade for the quick response on this one :D

I will experiment and see what the options are. But like you said wav's are large files and to cut in and out music might not be good, I guess what we need here is some sort of mix function that can use mp3 or something similar to allow a lineup or queue of music that you can mix in and out and link to reference points or to hidden pressure plates or Monsters etc.

Thanks :D
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: Is it Possible to Change Music During Gameplay?

Post by Komag »

in-level sounds must all be wavs, no mp3s allowed except for the one you choose for the whole level as the ambient. If you want to set up timers to start non-repeating wav sounds that when patched together sound like background sounds (overlapping a little, fade-in on top of fade-out with good timing), you might be able to achieve something like you're talking about.
Finished Dungeons - complete mods to play
User avatar
fazzasx
Posts: 104
Joined: Mon May 27, 2013 12:35 am

Re: Is it Possible to Change Music During Gameplay?

Post by fazzasx »

Komag wrote:in-level sounds must all be wavs, no mp3s allowed except for the one you choose for the whole level as the ambient. If you want to set up timers to start non-repeating wav sounds that when patched together sound like background sounds (overlapping a little, fade-in on top of fade-out with good timing), you might be able to achieve something like you're talking about.
Thanks Komag I will look at this also.
Post Reply