Open clemty opened 9 years ago
This would also apply to firing and explosion sounds, I guess. Or maybe we want to keep those, as they don't reveal as much information?
I would go for decreasing the "range" of hearing the sounds. I mean, you can hear gunfire from the other side of the map. Maybe limit it to 50-100 cells? Or make shroud muting too to some degree (for example only half of the range) or something like this.
@HenrytheSlav I was thinking about that, but wouldn't that be CPU-intensive?
You'd need to calculate the distance every time a unit makes a sound. Also, where is the person listening located? If you take the center of the camera you might not hear your units getting attacked on the other side of the map (would be an interesting gameplay mechanic though). If every actor is listening, you have to calculate a lot more distances.
Or maybe have a second, smaller, invisible ("sound-")shroud where units don't make the sound?
@clemty, @HenrytheSlav: The game already tries to do that, but it has never worked properly.
I think Tiberian Sun handled this by having certain weapons that would reveal shroud for enemies when they fired. I never fully understood how the enemy audio worked in any of the games, though. I want to say C&C64 used the sound-emitter's distance from the player's view in order to determine sound.
Units not visible to the player should not emit sound.
Currently in TD, newly built stealth tanks make the cloaking sound, giving away the fact that the enemy built them. Also, stealth tanks already existing in a map audibly cloak at mission start.
Muting units would have the side effect that artillery fire may come out of nowhere though.