Developer Lukas Vogel has ported Doom to run entirely inside a SQL database, with both the game logic and rendering handled through queries.
The project, called SQLDoom, stores level geometry and game state in CedarDB tables, while a lightweight Python script handles timing, input, and display output.
The result produces 35 full-color frames per second at 640×480 resolution, using roughly 1,300 lines of SQL code divided across 89 query blocks.
An earlier effort called DoomQL was launched last year and relied on raycasting with grayscale text characters, so it resembled Wolfenstein 3D more than Doom.
The raycasting skipped the BSP-tree traversal that helped distinguish Doom’s rendering approach, prompting Vogel to develop a second version.
For SQLDoom, the developer required both the rendering system and game loop to operate entirely through SQL, with output limited to exact-color tables or bitmaps.
“Rendering Doom in a database is obviously a bad idea,” Vogel said in a blog post about the project.
Building the new version meant recreating key parts of Doom’s rendering process using database operations rather than conventional game-engine code.
Handling the level geometry was relatively straightforward because a sort key calculated when each map loads lets a single ordering clause determine which wall sections are drawn.
Floors and ceilings presented a tougher problem. Doom’s original engine uses visplanes and state changes, neither of which translates neatly to column-by-column SQL rendering.
Vogel replaced that system with what he called a “pretty hacky” approach, looping through a sequence of sorted panels to fill those surfaces.
Source link







