Someone got Doom in an SQL database
1,300 lines of SQL querying renders accurate bitmapped views of Hell at 35 fps.

1,300 lines of SQL querying renders accurate bitmapped views of Hell at 35 fps.
The short version
- “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.
- 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.
What happened
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. There were a few complications in going from SQL table to rendered first-person frames, however.
Why it matters
Chief among these was the algorithm needed to render floors and ceilings, which can’t really make use of the elegant “visplanes” and state mutations that handle this rendering on a column-by-column basis in the original game.
Summary by Nerd News Network. Read the full article at Ars Technica via the links above and below.
