Re: FPS: How to mute the objects located at the other side of wall?

Hi,
Yukio, I'm not posting specific code, just a quick way to achieve this:
Scan around the player on your map and check for walls and objects that could be close. To make it simple, use a specific distance, e.g. 10 units in every cardinal direction. If you are scanning, say, north and you encounter a wall, have a temporary cut value stored. Then, as you go further north, reduce the volume of the objects you encounter.
Use a small value, in case you have many wall tiles. This can simulate wall thickness as well.
If you want to make it better, have a hearing_distance property on every object. Then, use this scan on the whole map and if the hearing distance is greater than the distance between the player and the object, reduce the object's volume.
This is normally handled by audio libraries and the effect we can achieve won't be as realistic, but it will work. In most cases a volume cut would not be enough, you'd also need a highcut filte r, but this is of course a lot more complicated.

Rob

_______________________________________________
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Development room : robjoy via Audiogames-reflector
    • ... AudioGames . net Forum — Development room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Development room : yukionozawa via Audiogames-reflector

Reply via email to