In game development, it’s important to recognise when not to reinvent the wheel. And so, 25 years after Id first lit Quake’s grimy hallways with blinking lights, we end up with the fluorescent lamps of Half-Life Alyx’s City 17 flickering in exactly the same way.
To clarify, this isn’t just a similar effect. As spotted by redditor CrazyGiaky, the flickering lights in Half-Life: Alyx operate identically to how they did back in the original 1998 Half-Life—two major engine changes and 22 years later.
In Source—and, evidently, both GoldSrc and Source 2—lights have a set list of properties that can be fiddled with in-editor. The flickering in controlled via a string of letters from A to Z (with A being pitch black and Z being full brightness). By changing this string, lights can be made to emulate a candle flickering, a soft LED pulse, or as demonstrated, a harsh, broken fluorescent lamp.
For example, a candle might use the string “nmonqnmomnmomomno”, whereas this particular effect is generated with “mmamammmmammamamaaamammma”.
Valve reusing code from Half-Life 1 is one thing. But the developer’s engine has its own roots in Id Software’s landmark Quake engine. Lo and behold, it turned out this method of breaking lights may have started with John Carmack’s engine—but with decades of 2D games preceding it, it’s more than possible this technique goes back even further.
We’re used to seeing developers talk about taking huge, technically impressive steps forwards, especially when it comes to something as complex as lighting. Even so, it’s sometimes nice to see that even after decades of progress, a simple trick can still fit the bill.
Continue Reading: Source link