Lukas Vogel's SQLDoom project renders full-color 640×480 Doom frames at 35 FPS using an SQL database, with game logic implemented in about 1,300 lines of SQL across 89 common table expressions, building on his earlier DoomQL project.
<p>"Rendering <em>Doom</em> in a database is obviously a bad idea," Lukas Vogel writes in <a href="https://cedardb.com/blog/sqldoom/">a lengthy blog post</a> explaining how exactly he managed to render <em>Doom</em> using an SQL database.</p>
<p>OK, that's not entirely accurate. The <a href="https://github.com/cedardb/sqldoom">SQLDoom project</a> 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 <a href="https://www.geeksforgeeks.org/sql/cte-in-sql/">common table expressions</a> implement the game logic and generate 35 bitmap framebuffers per second.</p>
<p>In this, SQLDoom is a major improvement over <a href="https://cedardb.com/blog/doomql/">Vogel's previous DoomQL project</a>, 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 <em>Wolfenstein 3D</em>. The newer SQLDoom, on the other hand, generates full-color 640x480 frames that look like they could have come from the original <em>Doom</em> executable.</p><p><a href="https://arstechnica.com/gaming/2026/10/can-it-run-doom-sql-database-edition/">Read full article</a></p>
<p><a href="https://arstechnica.com/gaming/2026/10/can-it-run-doom-sql-database-edition/#comments">Comments</a></p>
# Someone got Doom in an SQL database
Source: [https://arstechnica.com/gaming/2026/10/can-it-run-doom-sql-database-edition/](https://arstechnica.com/gaming/2026/10/can-it-run-doom-sql-database-edition/)
“Rendering*Doom*in a database is obviously a bad idea,” Lukas Vogel writes in[a lengthy blog post](https://cedardb.com/blog/sqldoom/)explaining how exactly he managed to render*Doom*using an SQL database\.
OK, that’s not entirely accurate\. The[SQLDoom project](https://github.com/cedardb/sqldoom)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](https://www.geeksforgeeks.org/sql/cte-in-sql/)implement the game logic and generate 35 bitmap framebuffers per second\.
In this, SQLDoom is a major improvement over[Vogel’s previous DoomQL project](https://cedardb.com/blog/doomql/), 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](https://en.wikipedia.org/wiki/Binary_space_partitioning)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\.
CedarDB ported the original 1993 Doom's game logic and BSP-based renderer entirely into SQL queries, running the game loop at 35 FPS with a full playable deathmatch demo inside the database.
Peter Gostev built a Doom-like game using SQLite as the game engine, with ray tracing via recursive CTE, and integrated with Datasette for a real-time web interface. The project was created using GPT-5.6 Sol and demonstrates the creative potential of using SQL for game logic.
The author built a joke programming language called bet that compiles via LLVM, uses arena-based memory management, and successfully runs the full DOOM game (56,000 lines) without code review, relying only on tests.
CedarDB introduces DoomBench, a benchmark that runs a multiplayer DOOM-like game in pure SQL to stress-test data stacks across analytical and transactional workloads, providing直观 visual performance comparisons.