System Fault Devlog 2
This week saw the introduction of a shift away from a single global reverb, to an underlying audio system that tweaks sound based on properties of the world.
Last week, System Fault had a single global reverb to which all sources were connected. Sounds were difficult to localize, particularly through walls or other obstructions. Regardless of whether a sound was blocked, it always sounded unobstructed and nearby.
This week, each area has its own distinct reverb effects send to which sounds are dynamically routed based on their containment. Further, lines of sight are updated between each sound and the listener. A separate system analyzes each line of sight, determines how many walls occlude the sound, and adds a low-pass filter which strips out more sound based on how many walls are blocking it. I’d have liked to provide an audio clip, but there are still a few wrinkles to work out and I never quite got the effect I wanted in any of my playthroughs.
There’s still more to do here. In particular, I’m not handling a literal corner case. If I’m standing slightly to the side of a door, a robot is in the next room, and there isn’t a direct line of sight, the robot’s sound and voice should emanate from the closest tile in the doorway connecting the rooms. While this is technically feasible, my hope is that the engine I’m using will soon add features making this task somewhat easier. As such, I’m punting on the more advanced audio engine rework until some of these anticipated changes land.
And, naturally, some foundational bugs were fixed. I resolved a hairy visibility calculation issue where the player and robots weren’t tracking visible tiles until one or more of them moved, and since system execution order is non-deterministic, it took a while to crack the root cause when sometimes I saw all nearby robots, sometimes nearby robots immediately saw me, and sometimes no one saw anyone until I took a step. I also continue to make progress on the initial egui accessibility pull request, which is close to getting merged pending a few final tweaks and checks.
With the initial audio engine in place, my focus now shifts in earnest from the robot-killing loop to the powerup-hunting loop. Hoping to have at least one completed powerup to show off in next week’s devlog.