We have been hearing a lot about ‘ray tracing’ lately, as it has become one of the key features associated with top-notch modern visuals. This rendering method enhances the portrayal of shadows and light in a more realistic and lifelike manner, and is now included as a graphics option in many of today’s games. It’s hard to imagine that such technology could be supported by a 42-year-old computer.
However, it seems that the ZX Spectrum, released by Sinclair Research in 1982, has been capable of this all along, especially with the expertise of Google Zürich senior software engineer Gabriel Gambetta. As reported by Hackaday (via PC Gamer), Gambetta has revealed how he used the Spectrum’s in-built programming language, Sinclair BASIC, to make the computer produce a shiny, ray-traced frame.
It’s worth noting that the ZX Spectrum comes with its limitations. As Gambetta points out, its processor is roughly 1,000 times slower than modern computers, with a meager 48 KB of RAM, the ability to display only 15 colors, and a resolution of 256×176. So, while it may not be able to render a beautiful, realistic screenshot from Cyberpunk 2077, it can still produce a still image of three colorful 3D objects with detailed shadows.
Gambetta detailed the entire process on his website. In short, after porting ray-tracing code into Sinclair BASIC and extensive testing at higher resolutions, Gambetta’s final test was able to produce an image that left him staring “in disbelief for a good minute.”
However, the final result still has some issues such as attribute clash, where the colors bleed into each other. Additionally, it took around 17 hours to render, resulting in a rather slow output. Nevertheless, given the computer’s limitations, this is an impressive and fascinating experiment. For those who are interested, I would recommend taking a look at the details on Gambetta’s website.
Looking for new games to play? Check out our recommendations for the best PC games and the best multiplayer PC games for some options to play with friends.