Sound System
GSoC 2011 > Sound System
In this page are described the features that will be applied to the sound related part of Planeshift. Notes about the features' implementation will be available as well.
Sound improvements
Make the Sound Manager a plugin
The Sound Manager today is inside the main planeshift client sources. It will be nice to have it made as a plugin to have a cleaner abstraction layer.
Sounds in factories
In CS every object has a factory and multiple instances, so you can have a mesh factory, which is a rock, and then instanciate it multiple times by changing its coords, rotation and texture. We would like to have the ability to associate sounds to the factories present in the world.
Distance lag effect of 3d emitters
Sound has a certain speed and openal unfortunately doesn't handle this factor so, even if it lowers the volume of distant sources, it will still make the sound of them run at the same time making the actual volume sound higher than it is actually. This would be about making emitters slow down when the player goes away from the source in order to unsync it from the other, more near emitters and go back to the normal speed after it has reached a certain offset from the more near object, in order to simulate this effect of distance and avoid equal sounds to stack.
Overall code cleanup
Here will follow a list of the cleanup interventions in the code.
Sounds events
We need to allow to play a sound when some events happen.
Random sounds on monsters
When they stand still and idle. If the race is an intelligent race, then we can play some phrases, if not we can just have screams/sounds.
Sounds associated to behaviours/actions of monsters
Like he is angry and plays the angry sound.
Sounds for each weapon and attack
If you attack with a sword you should hear the sound of a sword.
Random sounds from environment
Buzzes of flies, water for rivers, wind and so on so forth.
Musical instruments
This will allow players to use musical instruments.
Optional extensions
These things (or part of them) will be done during the GSoC coding time only time permitting. Otherwise they can still be included in the next GSoC or implemented by developers.
- Add ability to limit number of channels. The idea is to be able to limit the amount of sounds played at the same time coming from different sources. In the same areas you can have rivers, monsters, wind, and even the player clicking on the UI.
- Special actions to do when particular sound types are being played (for example reducing all other sounds/music volume)
- Allow voice speech in game through peer to peer connection.
- Have the walking sounds as a possible perception for monsters nearby. like a thief moving close to a monster to attack him first without making too much noise by walking, while a player with no sneak skills, will just make more noise while walking and the monster will hear this and attach him first.
- Have the sound of a player walking that vary based on the ground; so if it's rocky texture it's harder sound, and if it's grass is softer sound.
Skills needed
Our server and client are all coded in C++ and the sounds are defined in XML files. For this project C++ knowledge is needed, some basic knowledge of XML. No MySQL knowledge is required.
Difficulty
medium to difficult, depending on the parts of this which are picked up