Apex Legends developer Respawn found that a single line of code was the root cause of an elusive audio bug that arose following the launch of Season 16.
Breaking down the issue on the Apex subreddit, the dev team said they clocked the problem after recognizing that grenades would sometimes damage players without appearing to actually explode. It noted the issue didn't occur during Season 16 playtesting and also couldn't be replicated internally (at least, not initially).
At first, the team wondered if the system Apex uses to dispatch "stop" / "start" commands for various effects was to blame, and explained that because the game's servers simulate entities (such as weapons, abilities, and loot) they will emit sound and visual effects.
"Every server frame compiles an effects list of a maximum of 128 entries–any additional effects above the limit were getting dropped. This list is sent to any players who need the effects for the specific server frame," wrote the team.
"From there, the theory was that something may be flooding this engine limitation, requesting thousands of effects every second! But was this a systemic issue or could it be a single entity acting up? Every season update comprises thousands of changes to assets, code, script, and levels. Which meant finding a needle in a haystack."
Metrics would usually help a developer find the root cause of an issue at this stage, but Respawn said its telemetry data wasn't helpful since it "didn't indicate any flags or issues in the system."
"This left us with a complex issue that we knew was impacting our community, but was hard to reproduce despite detailed reports, had minimal leads internally, and there were no metrics to prove definitively that this limit was being hit at
Read more on gamedeveloper.com