In the tech world, there is an unspoken law: if a device has a screen and a processor, someone will eventually try to run Doom on it. We've seen it on pregnancy tests, smart fridges, and ATMs. But the team at CedarDB just took this obsession to a whole new level of absurdity by porting the 1993 classic not to a piece of hardware, but to a database query language. Yes, you read that right: Doom is now running in SQL.
The Logic of the Query
This isn't just a visual trick. The CedarDB team ported the original game logic and renderer almost entirely to SQL. By treating the game's WAD data—the maps, textures, and monsters—as tables, they turned a database into a game engine. The result is surprisingly smooth, with the game loop hitting the original 35 FPS and the renderer pushing 320x200 frame buffers at up to 60 Hz on a standard laptop.
Pushing Turing-Completeness
Beyond the meme value, this is a masterclass in demonstrating the limits of Turing-completeness. The project handles complex tasks like BSP (Binary Space Partitioning) traversal and visplanes directly inside the database. Interestingly, the team noted that multiplayer deathmatches actually work 'almost for free' because of the way the data model is structured. While some skeptics point to the Python wrapper used for the heavy lifting, the core achievement remains a wild exploration of how far SQL can be pushed.
Whether this means we'll soon be running LLM inference via a SELECT statement is up for debate, but for now, it's a brilliant reminder that with enough ingenuity, any language can become a gateway to Hell.
Sources
Media



