Jump to content

Recommended Posts

Hello All,

Just to let you all know the sound development hasn't stopped, of course... I have a new branch up on git at:

https://github.com/stwf/0ad/tree/threaded-sound

This has moved the work of keeping music going into a separate thread. If anyone wants to give it a try, please do. Only tested on a mac, but it let me lower the buffer sizes a lot and didn't miss a beat (ha). I'll test in on some different platforms before I think about making a patch.

There also may be a fix for the reports of bad sounding music, and the hissing issue. So any one who still has one of those problems could also help out by trying out the code.

In absence of bug reports I'll be tackling the sound roll off as we zoom in and out, and as far as I know thats it as far as specced behavior.

So otherwise let me know what issues you'd like to be tackled next... Some sort of a system for battle sounds? Different handling of the music choices (other than endless repeating). Intensity based triggers for using alternate sounds (like groups of 10 woodcutters).

Let me know!

steve

Link to post
Share on other sites
  • Replies 65
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

OK, I just checked in some changes. I rolled back some of the volume rolloff stuff, so you can always hear everything (on screen at least). Off screen will roll off quicker, but not as sharply. Fixed

Thanks for the update (y)

It would be nice to have unit movement sounds looping constantly until the unit stops moving. All we hear currently is the movement sound playing once at the start of any movement (see ships and siege weapons), and it stops even if the unit is still moving.

Another request would be for a way to play a unit sound independently from the 'event' time. See this post (staff forums) and the preceding discussion for more info.

Link to post
Share on other sites

It would be nice to have unit movement sounds looping constantly until the unit stops moving. All we hear currently is the movement sound playing once at the start of any movement (see ships and siege weapons), and it stops even if the unit is still moving.

If so it should be very, very quiet, otherwise it will get annoying quickly. Like the gate sound is now :P

Link to post
Share on other sites

How about making it so that players only hear UI sounds related to their own units ;) Also I would like a way to control voice and/or UI volume independently of the other volume controls, I don't see a way to do that yet. Music shouldn't cut off abruptly when a game starts, and it shouldn't continue playing in Atlas after the simulation ends (ambient sounds do the same thing IIRC). Music shouldn't just loop forever IMO, periods of silence are not a bad thing. Most of the music code should be stripped out of the UI scripts. Adding sounds to the UI would be nice (button presses, etc.) Double click selection of units plays multiple voice responses in succession. Battles sound terrible with all the repetitive death grunts.

There's a few ideas for you, but the biggest problem is sounds not respecting the camera position/zoom. With the new shared ally LOS, I can hear units dying on the opposite side of the map.

Link to post
Share on other sites

How about making it so that players only hear UI sounds related to their own units ;) Also I would like a way to control voice and/or UI volume independently of the other volume controls, I don't see a way to do that yet. Music shouldn't cut off abruptly when a game starts, and it shouldn't continue playing in Atlas after the simulation ends (ambient sounds do the same thing IIRC). Music shouldn't just loop forever IMO, periods of silence are not a bad thing. Most of the music code should be stripped out of the UI scripts. Adding sounds to the UI would be nice (button presses, etc.) Double click selection of units plays multiple voice responses in succession. Battles sound terrible with all the repetitive death grunts.

There's a few ideas for you, but the biggest problem is sounds not respecting the camera position/zoom. With the new shared ally LOS, I can hear units dying on the opposite side of the map.

The UI sound issue should've been fixed in r12553. Are you sure about distant sounds? Presently I don't hear any non-selection sounds if they aren't on-screen (tested training, gathering, death).

Link to post
Share on other sites

The UI sound issue should've been fixed in r12553. Are you sure about distant sounds? Presently I don't hear any non-selection sounds if they aren't on-screen (tested training, gathering, death).

I get "construction complete" sounds from the enemy's buildings at the other end of the map if 'reveal map' is on.

Edited by zoot
Link to post
Share on other sites

If so it should be very, very quiet, otherwise it will get annoying quickly. Like the gate sound is now :P

Yes, it should be very quiet, but will add to the realism of the game. Katie is working on some new gate sounds for us, she's just been very busy at work the past month.

I think you should be able to hear enemy siege and ships if they are on screen.

Link to post
Share on other sites

The UI sound issue should've been fixed in r12553. Are you sure about distant sounds? Presently I don't hear any non-selection sounds if they aren't on-screen (tested training, gathering, death).

That looks like a different problem. The training/construction complete sounds aren't related to selection. They are basically UI alerts for the player who owns them, I think LOS or on-screenness shouldn't have any effect. It might help to classify the possible sounds in some kind of chart:

Sound | Player | Allies | Enemies | Camera relative?

--------------------------------------------------------------------------------------------------------------------

Generic UI sounds X No

UI alert X No

(construction/training/research

finished, attack alert)

Unit command response X No

("yes?", "attack!", etc.)

Unit selection X ? ? No

Building selection X ? ? No

Action sounds X X X Yes. Visible onscreen only, use position and zoom

(gathering/battle/dying/moving)

Player-specific music X No

Ambient sounds X X X Depends - in the simple case it would be global,

(birds, wind) in the advanced case we could have ambient emitters

so different parts of the map have different ambience

(desert, ocean, forest - all sound different)

A request I have would be to put back the selection sounds for objects owned by other players. Or at least give some kind of audio feedback when selecting an enemy building, for instance. It just feels weird when I don't get any audio feedback when selecting my ally's or enemy's things.

What if there was a generic "clink" sound? Similar to how we want UI buttons to make sounds when pressed. It would be nice to keep the building sounds for the owner only, then it becomes a useful indicator of when a building is constructed (whereas if that sound occurs all the time, it's less useful)

Link to post
Share on other sites

What if there was a generic "clink" sound? Similar to how we want UI buttons to make sounds when pressed. It would be nice if keep the building sounds for the owner only, then it becomes a useful indicator of when a building is constructed (whereas if that sound occurs all the time, it's less useful)

Hmm, maybe we could have "a generic other player unit selection sound" and "a generic other player building selection sound"? Not a big deal either way, but it just seems a bit weird if it would be "clink" :) I guess my main point is that I would want the unit/building sound to be different from the UI sound :) I do agree that it's probably a good idea to have some audio confirmation that you've selected something, even if it is your enemy's, and I think it's best to reserve the building-specific sound to player-owned buildings. And I think your chart makes sense. For ambient: what about have the global as an "automatic" ambient sound and then make it possible for scenario designers/map makers to place ambient emitter object in Atlas/RMS scripts? (If it's not too much work it could of course be nice to have some more general desert/ocean/forest/corrals/etc ambient sounds, but I think the priority should be: global-->placeable-->"automatic" :) )

Link to post
Share on other sites

What if there was a generic "clink" sound? Similar to how we want UI buttons to make sounds when pressed. It would be nice to keep the building sounds for the owner only, then it becomes a useful indicator of when a building is constructed (whereas if that sound occurs all the time, it's less useful)

I'm talking purely about selection sounds, not construction sounds. You wouldn't hear the sounds constantly, only when selecting the enemy item. :)
Link to post
Share on other sites

For ambient: what about have the global as an "automatic" ambient sound and then make it possible for scenario designers/map makers to place ambient emitter object in Atlas/RMS scripts? (If it's not too much work it could of course be nice to have some more general desert/ocean/forest/corrals/etc ambient sounds, but I think the priority should be: global-->placeable-->"automatic" :) )

I like this idea!

Link to post
Share on other sites
For ambient: what about have the global as an "automatic" ambient sound and then make it possible for scenario designers/map makers to place ambient emitter object in Atlas/RMS scripts? (If it's not too much work it could of course be nice to have some more general desert/ocean/forest/corrals/etc ambient sounds, but I think the priority should be: global-->placeable-->"automatic" :) )

How about making it possible to fit any actor with an ambient emitter - some emitters could then merely be a "bodyless" actor without a model (e.g. for the sound of sandstorms in a desert), while others could be put on existing objects (e.g. a mill might emit ambient sawing noises, a fishing node might emit the splashes of fish jumping at the surface, barracks might emit the sounds of soldiers preparing weapons ahead of battle etc.)

Link to post
Share on other sites

How about making it possible to fit any actor with an ambient emitter - some emitters could then merely be a "bodyless" actor without a model (e.g. for the sound of sandstorms in a desert), while others could be put on existing objects (e.g. a mill might emit ambient sawing noises, a fishing node might emit the splashes of fish jumping at the surface, barracks might emit the sounds of soldiers preparing weapons ahead of battle etc.)

That sounds like it should be possible yeah :)

The things which are important to remember imho when it comes to ambient sounds in whichever way they're implemented are 1) that their volume can be set independently of other sounds (and is relatively low in comparison to the other sounds by default) and 2) that they are implemented in such a way that they only play every now and then (possibly randomly, and perhaps in such a way that you can set an optional "silent time", or a "silent time range", i.e. that the sound isn't played for say 15-30 seconds or something).

Link to post
Share on other sites

Though I do like the idea of being able to place sound emitter objects in Atlas as an option, it kinda seems like a burden for scenario designers. Especially when so many maps share similar terrain. In AOK, weren't there terrain specific sounds or was it map specific? I remember at least an audible difference when viewing water vs. land. We could somehow add sound properties to terrains (we already have per-terrain pathfinder and material settings, so why not sound?). Then the sound manager would select which ambient sound to play based on camera position and visible terrain, while if the player zoomed out to see much of the map, it could fade to a generic wind sound.

Link to post
Share on other sites

Though I do like the idea of being able to place sound emitter objects in Atlas as an option, it kinda seems like a burden for scenario designers. Especially when so many maps share similar terrain. In AOK, weren't there terrain specific sounds or was it map specific? I remember at least an audible difference when viewing water vs. land. We could somehow add sound properties to terrains (we already have per-terrain pathfinder and material settings, so why not sound?). Then the sound manager would select which ambient sound to play based on camera position and visible terrain, while if the player zoomed out to see much of the map, it could fade to a generic wind sound.

Yes, that seems like the best solution. Placeable emitters can be a secondary/lower priority solution to be implemented later if anyone have time.

Link to post
Share on other sites

Though I do like the idea of being able to place sound emitter objects in Atlas as an option, it kinda seems like a burden for scenario designers. Especially when so many maps share similar terrain. In AOK, weren't there terrain specific sounds or was it map specific? I remember at least an audible difference when viewing water vs. land. We could somehow add sound properties to terrains (we already have per-terrain pathfinder and material settings, so why not sound?). Then the sound manager would select which ambient sound to play based on camera position and visible terrain, while if the player zoomed out to see much of the map, it could fade to a generic wind sound.

In AoK I think (though I could definitely be wrong) that the sounds were tied to the buildings. Iirc e.g. the sea sounds were played over the docks. Either way, would it be much harder to do sounds which can only be attached to either terrain or objects or which can be attached to both? If it's not much more difficult I'd say go for make it possible to attach ambient sounds to just about anything and we have the options to do whichever works best in the different cases :)

Speaking about ambient sounds from a more general/sound engine point of view: it would probably be nice to have the engine automatically just play one (or at most at few) of the possible ambient sounds which can be played depending on the different emitters on screen. And at around maximum zoom just play a generic wind sound or something.

Link to post
Share on other sites
  • 2 weeks later...

OK, finally the volume roll off with distance seems to be working well. Also the threaded maintenance of looping sounds! Now checked into svn. Let me know how it works...

Thanks for all of the feedback I'll comment on them in the next post

Link to post
Share on other sites

OK, I'll put these in the rough order I'll take them on....

Sound | Player | Allies | Enemies | Camera relative?

--------------------------------------------------------------------------------------------------------------------

Generic UI sounds X No

UI alert X No

(construction/training/research

finished, attack alert)

Unit command response X No

("yes?", "attack!", etc.)

Unit selection X ? ? No

Building selection X ? ? No

Action sounds X X X Yes. Visible onscreen only, use position and zoom

(gathering/battle/dying/moving)

Player-specific music X No

Ambient sounds X X X Depends - in the simple case it would be global,

(birds, wind) in the advanced case we could have ambient emitters

so different parts of the map have different ambience

(desert, ocean, forest - all sound different)

I'll try get the sounds adhering to this chart, except perhaps the ambient issues. It seems like thats just a nice finishing touch but not really a priority at this point.

Also maybe here it would be good to take the music control out of the scripts hands. The scripts can still start music but I'll take out the part where they do now. Let the SoundManager play each of the Peace songs with a gap in between. Also pause it and the ambient when the game pauses.

It would be nice to have unit movement sounds looping constantly until the unit stops moving. All we hear currently is the movement sound playing once at the start of any movement (see ships and siege weapons), and it stops even if the unit is still moving.

This seems like it should be done.

and the system alarm (warning) when troops are attacking, you can programm that, its necesary.

I agree this feature is necessary, also to have it display on the minimap. Like RoN, but I'm not sure this is a sound manager issue. It should either be up to the scripts to send this message, or part of the larger battle detection issue.

What if there was a generic "clink" sound? Similar to how we want UI buttons to make sounds when pressed. It would be nice to keep the building sounds for the owner only, then it becomes a useful indicator of when a building is constructed (whereas if that sound occurs all the time, it's less useful)

It would be good to have the UI sounds, do we have any? I can always make some bad ones and put them in there as placeholders I guess. I have seen some discussion on switching the UI engine. In that case perhaps this work could wait.

Yes, that seems like the best solution. Placeable emitters can be a secondary/lower priority solution to be implemented later if anyone have time.

yup, A nice idea also like RoN have buildings make a noise. I think it only does it once though, each time they come into view. I'll double check on that...

OK, thanks again for the ideas... feel free to comment or add on

Link to post
Share on other sites

Did a very quick test on my Mac. Seems to work nicely. Can't notice any of the sudden music start issues I could before.

The source code looks a bit cludgy though, with a massive whitespace gap. Remember to format according to coding conventions before you commit to SVN.

Link to post
Share on other sites

To add onto Kieran's comment about code formatting, you might also read our page on coding conventions, I corrected some unconventional formatting in the new sound manager patch when committing it. I think the biggest issues were mixing tabs and spaces, and having inconsistent spacing around parentheses.

It would be good to have the UI sounds, do we have any? I can always make some bad ones and put them in there as placeholders I guess. I have seen some discussion on switching the UI engine. In that case perhaps this work could wait.

Switching the UI engine is extremely unlikely at this point. I haven't seen any more than words about it.

For UI sounds, see http://trac.wildfiregames.com/ticket/948 - they should be a property of the UI XML so they are easy to customize. It's just a question of hooking up the UI engine events with the new sound manager (preferably UI sounds have their own "channel" so the user can easily mute them or adjust volume). We have some UI sounds in audio/interface, hopefully those are good enough for a start :)

Link to post
Share on other sites

ok, gotcha

So as intended, things like chopping and mining are inaudible when zoomed out.

Unintended bug, distanceless sounds like responses also fade out with distance, I will fix that.

So you do expect battle sounds to fade out with distance and they currently don't, right?

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...