Reddit user CrazyGiaky noticed something interesting about the flickering lights in Half-Life Alyx. When compared next to flickering lights in the original Half-Life game, the two seemed to sync up. It seemed like Valve was still using the same bit of code to control these lights 22 years later. And that’s exactly what’s going on!
Modern video games are often built on top of old code and data because games are hard to make and sometimes if it ain’t broke, they don’t fix it. So it’s not surprising that Valve is still using code from 1998’s Half-Life to control the flickering lights in 2020's Half-Life Alyx. What’s actually surprising is just how old this code is!
Another Reddit user, Lazermaniac, provided a detailed explanation of what’s going on with these flickering lights, explaining that lighting in Valve games hasn’t changed much over the last two decades.
“From what I can see, the effect is handled by assigning a string of letters that indicates the sequence of brightness changes, with a being fully dark and z being fully bright,” explained Lazermaniac. “The fluorescent flicker effect is defined by the string “mmamammmmammamamaaamammma” [with] “m” being the default brightness setting without any changes.”
What’s wild is that this flickering pattern can be found in not only Valve titles, but in Quake. That’s because Half-Life was built off a heavily modified version of the original Quake engine. So it’s very likely that long and random string of Ms and As that controls when a light should flicker was written over 20 years ago by John Carmack himself. And because Valve’s original Half-Life 1 engine (Goldsrc) and later Source, used to power all Valve since Half-Life 2, contain bits of old Quake code still, these flickering lights sync up perfectly.”
“It kinda blows my mind to think that single string of letters defined lighting effects in my favorite games for almost 25 years now,” said Lazermaniac on Reddit. And I have to agree with them. It’s a strange little thing that I never noticed before, but now I’ll be staring at the flickering lights whenever I play games like Portal 2 or Half-Life, wondering how many more games they’ll be around to greet me in.