Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What you probably want is to place a virtual listener/receiver where the NPC is, so the system would use the same rendering that it does for the player. Then you put an envelope detector on the signal and you have an approximation of how much sound is reaching that NPC.

You could also render the player sound separately from environmental sounds. So the NPC only hears the player if their sound exceeds the environmental noise.

You could get real fancy and do some directional processing on the NPC so they’ll go in the apparent direction.

It’s probably overkill though. You could probably do a much cheaper approximation and it would feel about the same to the player. It would be fun to test it out and see though!



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: