Sundae2608 / BattleSimulation

Battle Simulation mimicking the mechanics of the Total War series
1 stars 0 forks source link

Sound system with both individual and crowd sound. #89

Open Sundae2608 opened 4 years ago

Sundae2608 commented 4 years ago

At the moment, all the sounds in the game are crowd-based, which means they are recorded as belonging to the large crowd. For example, both cavalry charge and fighting sound are crowd-based and is being scaled with the number of troops engaged in the activities. The sound is loud when there are lots of troops fighting, but a bit quieter when there are fewer troops.

However, this becomes an issue if the number of engaged troops is so few, in which the sound will be fundamentally different. For example, the sound of a few arrows clashing is much different than the sound of many arrows clashing.

The long-term stable solution for this problem is to have a system that takes the number of sound events per turn (which we already have with the AudioSpeaker system), but we then process them differently when there are few events vs many events.