FizzleFade
I enjoy reading a lot of source code and after 15 years in the field I feel like I have seen my fair share. Even with a full-time job, I still try to spare evenings here and there to read. I don't see myself every stopping. It is always an opportunity to learn new things to follow somebody's mind process.
Every once in a while I come across a solution to a problem that is so elegant, and so creative that there is no other word but "beautiful" to describe it. Q_rsqrt, better knows as "Inverse Square Root" and popularized by Quake 3, definitely belong to the family of breathtaking wizardry. While I was working on the Game Engine Black Book: Wolfenstein 3D I came across an other one: Fizzlefade.
Fizzlefade is the name of the function in charge of fading from a scene to an other in Wolfenstein 3D. What it does is turn the pixels of the screen to a solid color, only one at a time, seemingly at random.
Out of respect for the author only the opening is shown here. Read the rest on the original site, or in HorizonReader with highlights, notes and AI help.