Software developer Lukas Vogel has rendered the video game Doom using an SQL database, generating 35 full-color 640×480 bitmap framebuffers per second. The project, named SQLDoom, relies on a small Python client to handle input, output, and game timing while the underlying database tracks all game geometry and state.
How SQLDoom Processes Game Logic Through Relational Tables
Rendering Doom entirely within a database is described by Vogel himself as a bad idea, but the technical execution breaks the game down into manageable relational components. Behind the Python client, CedarDB tables handle the backend processing. Approximately 1,300 lines of SQL queries spread across 89 common table expressions implement the core game logic.
Converting the classic game’s WAD files into a relational database proved straightforward due to how the original title structured its levels. Levels consist of distinct vertices, lines, and sectors. Even the game’s binary-space partition trees translate into SQL by utilizing a pre-computed sort key for objects at load time. With this key established in the table, a simple ORDER BY statement determines which wall segments appear on screen during each frame.

Comparing SQLDoom to Previous ASCII Raycasting Experiments
The current SQLDoom build represents a substantial technical leap forward from Vogel’s previous attempt. Last year, the developer built DoomQL, a multiplayer shooter entirely in SQL that was limited to raycasting-based, grayscale ASCII graphics. Those earlier visuals resembled the 90-degree-angled maps found in Wolfenstein 3D rather than the smooth geometry of Doom.
By contrast, the new system produces full-color output that mirrors the visual fidelity of the original executable. Organizing the spatial data with pre-computed sort keys vastly improves performance, allowing the database engine to quickly ignore out-of-sight walls and render active geometry in real time.
Frequently Asked Questions About Database-Rendered Gaming
What handles the input, output, and timing for SQLDoom?
A small Python client manages user inputs, keeps track of game timing, and displays each generated frame to the screen.
How many frames per second does the SQL database generate?
The system generates 35 bitmap framebuffers per second at a 640×480 resolution.
Why was converting the original WAD files straightforward?
The process worked efficiently because the original game divided its levels into distinct structural elements like vertices, lines, and sectors that map easily into relational database tables.