hi, this week i added ambience sounds, so i could place sounds in the scene which will be played based on their properties defined in the map file.
unlike other sounds, those sounds usually played automatically (some ambient creepy sounds), or by triggering some triggers/events (like opening a door, or using an elevator)
here is an example of sound entity defined in the map:
"origin" "753.48 2078.26 66.7"
ok, so what are all those properties do? here is a quick info:
origin - the position in 3d space of the sound (if ambient this will be ignored)
classname - internal use, basically its the type of the entity
angle - control the spread of the sound
s_shader - sound shader or sound media file (.wav, .ogg, .mp3)
s_looping - need to loop or not (repeat the sound over and over)
s_shakes - shake factor controlling how strong the view will be shake when playing the sound (also based on the loudness of the sound)
name - name of the sound/speaker entity
s_volume - volume of sound (in decibels)
s_mindistance, s_maxdistance - minimum and maximum audible distance for the sound
s_occlusion - is this sound need to take care of geometry occlusion or not
s_waitfortrigger - sound will be played only when the right trigger will be triggered
soundgroup - the group the sound belongs to, useful for setting volume for few sounds, for example, all music sounds added to group "music" so if we want to mute the music in the game we just mute the group called "musics" and its done.
wait - delay between playing the sound again
random - random factor added to wait when needing to play the sound again
s_global - is this sound need to be heard every where (makes the sound ambient - used for music), if its ambient the sound will ignore his 3d properties.
so as you can see it is very easy to define ambient sounds in the scene, those sounds adding alot to the game play and make the game more realistic.
for now, geometry occlusion is not supported maybe i will add it next time.