Someone got Doom in an SQL database



“Rendering Doom in a database is obviously a bad idea,” Lukas Vogel writes in a lengthy blog post explaining how exactly he managed to render Doom using an SQL database.

OK, that’s not entirely accurate. The SQLDoom project uses a small Python client to handle input and output, drive the game’s timing, and display each frame to the screen. Behind that, a series of CedarDB tables tracks the game geometry and state, while about 1,300 lines of SQL queries spread across 89 common table expressions implement the game logic and generate 35 bitmap framebuffers per second.

In this, SQLDoom is a major improvement over Vogel’s previous DoomQL project, which last year set out to build “a multiplayer Doom-like shooter entirely in SQL.” Unfortunately, that effort ended up with raycasting-based, grayscale ASCII graphics that were more akin to the simplistic 90-degree-angled maps of Wolfenstein 3D. The newer SQLDoom, on the other hand, generates full-color 640×480 frames that look like they could have come from the original Doom executable.

It’s all just data, man

Converting Doom‘s classic WAD files to a relational database was relatively simple and straightforward, Vogel writes, because of the way the original game broke levels down into vertices, lines, sectors, and so on. Even Doom‘s famous binary-space partition trees can be broken down into SQL using a sort_key for objects that’s pre-computed for each position at load time. With this set in your table, a simple “ORDER BY” statement can determine every frame which parts of walls to display and which to ignore, vastly improving performance.



Source link

  • Related Posts

    Today’s NYT Strands Hints, Answers and Help for Oct. 3, #944

    Looking for the most recent NYT Strands puzzle answers? CNET publishes daily answers and hints for The New York Times Mini Crossword, Connections, Connections: Sports Edition and Strands puzzles. Strands…

    Continue reading
    Meta open sources code to let you make Muse AI gadgets

    Meta now lets you make your own Muse gadgets that feature the company’s new AI agent with code that the company open sourced. The company suggests projects like loading Muse…

    Continue reading

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    You Missed

    Undetected software issue knocked out 911 for several provinces last month, Bell report says

    Undetected software issue knocked out 911 for several provinces last month, Bell report says

    Share of the Week: Marvel’s Wolverine – Logan – PlayStation.Blog

    Share of the Week: Marvel’s Wolverine – Logan – PlayStation.Blog

    Today’s NYT Strands Hints, Answers and Help for Oct. 3, #944

    Today’s NYT Strands Hints, Answers and Help for Oct. 3, #944

    9 Sustainable And Nontoxic Outdoor Rugs For Summer 2026

    9 Sustainable And Nontoxic Outdoor Rugs For Summer 2026

    WATCH: 8-year-old turns race car driving dream into reality

    WATCH:  8-year-old turns race car driving dream into reality

    Ind vs WI – Daren Sammy – ‘Results have not gone our way, but we continue to improve’

    Ind vs WI – Daren Sammy – ‘Results have not gone our way, but we continue to improve’