I was thinking about improving the Cataclysm experience and my thoughts got to the point where I wannt to add sounds to the game. Because the tiles are on their way (I believe they are).
It will be too much for developers to think about what audio sample they want to put on breaking door or banging zombie’s head with a burst of shrapnel since they have a lot of gameplay and balance business now.
My suggestion is to write everything that happens to player to some sort of an output stream. It may be stdout or stderr or maybe any other stream. But the std’s would be the best. Something like std::cout<<“thud_west” or <<“clear_window” would be great.
If this will be done I can write a launcher that will catch these messages and play sounds according to them. From this point player will be more aware of what is happening in the game since he will not only read it in the number of strings to the right, but also hear it.
Now I’m going to make an experimental build with the guys from 2ch, but if some volunteers want to help me with the output part - please pm me or write in this thread.
If you do sound, do it right. Cataclysm is a very immersive/“realistic” game, so whatever API you use to catch sounds, it should have the relative position to the player, as well as the loudness(including e.g. using floodfill to compute the amount of walls between the player and the source of the sound).
Cool, this is similar to what I proposed the last time sound effects and music came up. Part of the issue is that cross-platform audio support is even more fragmented than cross-platform graphics, so doing all this in-game encounters major issues with including libraries and keeping them happy, and also sound imposes asynchronous programming issues that we generally don’t have to worry about (and I’d like to keep it that way if possible).
On linux/mac the obvious way to do this is with either a named pipe, or a local socket. I think the simplest way to do this would be with a local UDP socket, and I’m sure that’s generic enough to work on all our target platforms. The cataclysm process would listen on a UDP socket (port determined by a config file probably, that way you can change it in case of conflicts, and the other side can read the config file too.), and if another process opens the socket, we start pushing out sound events in UDP packets, probably just ASCII encoded, or maybe json since we’re fairly standardised on that.
It really shouldn’t be all that hard to hook up the current sound infrastructure to spit out events when various things happen, and at some point we could either expand it to music control or add a seperate socket for that. That way you could have ambient events like “x monsters spotted” and “driving”, and “sleep”, “crafting”, whatever that could influence music, even procedural music generation if someone were interested in that.
Music would be nice, sounds effects however wouldnt be a absolute necessity.
DF had only music and it was nice that way.
Any idea where to source the sounds?
You could probably ask the same question on a new thread without bumping this outdated 3-year-old one.
The point being if you don’t follow forum ettiquite like staying on topic for the thread you post in and not reviving long-dead threads, your posts will get ignored, like this one.
It’s on topic, and i don’t understand the stigma against necromancy. It just prevents people from rehashing what others have discussed.
It’s not possible for a post in this thread to be ontopic, the proposed sound system never happened and a different one was merged.
It precisely keeps people from rehashing what others have discussed, forums aren’t generally interested in resurrecting ancient topics.
I don’t care if you agree, stop it.
I appreciate the explanation, dislike the obvious. Already finished my necroing, don’t fear :).