|
|
|
|
|
by duped
844 days ago
|
|
I'm no expert but one issue is that "correct" sound propagation needs to handle frequency dependent refraction (why sound is muffled coming from the other room, in additional to leakage through the wall). One total hack I would imagine would work alright is to render the scene twice, once displayed to the player and the other where the only light sources are the player's sound and walls/windows/etc just have some opacity changed. If the light around the enemy is above a threshold the player is detected. You wouldn't need to render the whole scene, just the area immediately around the player, and avoid doing it if there are no enemies. Another hack that would be more involved would be to compute a kind of graph for the whole level and when a player makes noise, you propagate it through the graph using precomputed weights. You'd have to handcraft a graph for every level. But I could imagine this getting the best results in terms of performance and gameplay, since you could tune it per scene. |
|