Skip to main content

SQLDoom: Doom Rendered Directly from an SQL Database

SQLDoom: Doom Rendered Directly from an SQL Database

THE TECH CHRONICLE  ·  technology  ·  Sunday, October 04, 2026
SQLDoom: Doom Rendered Directly from an SQL Database

The implementation relies on roughly 1,300 lines of SQL queries and 89 common table expressions, while a lightweight Python clien…

By TechPulse Blog

Lukas Vogel released a project named SQLDoom that runs the classic first‑person shooter Doom by storing the entire game world and logic inside a relational database called CedarDB. The implementation relies on roughly 1,300 lines of SQL queries and 89 common table expressions, while a lightweight Python client handles player input, timing, and frame output.

Key Takeaways

  • SQLDoom demonstrates that a full Doom level can be generated and updated using only SQL statements.
  • The project’s core consists of about 1,300 lines of SQL and 89 common table expressions.
  • CedarDB stores both geometry and game state, while a minimal Python client provides the rendering loop.
Metric Value Why it matters
Project SQLDoom Shows SQL can drive real‑time graphics.
Creator Lukas Vogel Provides a single‑author perspective on the experiment.
Database Engine CedarDB Acts as the sole repository for game data and logic.
SQL Query Count ≈ 1,300 lines Indicates the level of procedural complexity required.
Common Table Expressions 89 Highlights extensive use of CTEs for recursive and hierarchical queries.

What SQLDoom Is

At its core, SQLDoom is a proof‑of‑concept that re‑creates Doom’s rendering pipeline using only relational queries. Instead of a traditional game engine written in C or C++, every wall, sprite, and enemy position lives as a row in CedarDB tables. When the player moves, the Python client issues a new set of SQL statements that recompute visibility, collision, and rendering order, then returns a bitmap that the client displays.

Architecture Overview

We observed that the system splits responsibilities cleanly: the Python client is deliberately thin, acting as a bridge between the operating system’s input devices and the database’s query engine. All heavy lifting—ray casting, sector traversal, and state updates—occurs inside SQL. The use of 89 common table expressions suggests that the author leverages recursive CTEs to walk sector graphs and compute line‑of‑sight, a technique more common in analytics than in real‑time gaming.

SQL Query Complexity

The roughly 1,300 lines of SQL are organized into a series of modular queries that each address a specific aspect of the game loop: loading map geometry, calculating floor and ceiling heights, determining visible walls, and updating enemy AI. By nesting CTEs, the author can express multi‑step transformations without leaving the SQL environment, effectively turning the database into a stateful game engine.

Performance Considerations

Running a real‑time title like Doom on a database raises natural questions about latency and frame rate. While the source does not provide benchmark numbers, the reliance on a lightweight Python client for timing implies that the author measured execution time within the client loop. The fact that the entire engine fits within a single relational schema suggests that CedarDB’s query optimizer plays a critical role in maintaining acceptable responsiveness.

Context: SQL as a Game Engine

SQL is traditionally used for data retrieval and reporting, not for deterministic, frame‑by‑frame computation. SQLDoom therefore sits at the intersection of database research and game development, echoing earlier experiments that used spreadsheets or functional languages to drive graphics. By pushing the limits of CTEs and set‑based logic, Lukas Vogel demonstrates that relational algebra can express the same spatial reasoning required by classic 3D engines.

Why It Matters

SQLDoom challenges the conventional separation between data storage and application logic. If a relational engine can handle the deterministic updates of a fast‑paced game, developers might reconsider where to place business rules, especially in cloud‑native architectures where databases are already managed services. The project also serves as an educational sandbox for engineers who want to explore the expressive power of SQL beyond CRUD operations.

Frequently asked questions

Who created SQLDoom?

The project was authored by Lukas Vogel, who documented the experiment in a blog post.

What technologies does SQLDoom combine?

SQLDoom pairs a small Python client for input handling and frame display with CedarDB, a relational database that stores all game geometry and state.

How extensive is the SQL codebase?

The implementation consists of approximately 1,300 lines of SQL queries, organized into 89 common table expressions.

Is the source code publicly available?

The source article mentions a blog post but does not specify a repository location.

What is the significance of using CTEs?

Common table expressions enable recursive and hierarchical queries, which the author uses to model Doom’s sector‑based map traversal within pure SQL.

Bottom Line

SQLDoom proves that a relational database can serve as the sole engine for a classic 3D game, relying on roughly 1,300 lines of SQL and 89 CTEs to drive rendering and gameplay, while a minimal Python client handles I/O. The experiment expands the perceived capabilities of SQL and invites developers to explore database‑centric architectures for interactive applications.

As database platforms continue to evolve with faster in‑memory processing and native support for procedural logic, projects like SQLDoom hint at a future where the line between data storage and real‑time computation becomes increasingly blurred.

Reporting based on: original source.

Comments

Popular posts from this blog

Tracking your plastic: Exposing recycling myths

Tracking your plastic: Exposing recycling myths Marketplace journalists go undercover overseas and pose as recycling brokers to expose the lucrative plastic recycling business. We reveal that Malaysian companies are willing to break the law to buy Canadian plastic and show how some of it is dumped and burned in illegal landfills, where the toxic fumes and run-off appear to be making people sick. Back in Canada, we buy nine tonnes of plastic and secretly track where big companies are taking it. Will it actually get recycled? »»» Subscribe to CBC News to watch more videos: http://bit.ly/1RreYWS Connect with CBC News Online: For breaking news, video, audio and in-depth coverage: http://bit.ly/1Z0m6iX Find CBC News on Facebook: http://bit.ly/1WjG36m Follow CBC News on Twitter: http://bit.ly/1sA5P9H For breaking news on Twitter: http://bit.ly/1WjDyks Follow CBC News on Instagram: http://bit.ly/1Z0iE7O Download the CBC News app for iOS: http://apple.co/25mpsUz Download the CBC News app for ...

Red states now legalizing recreational marijuana too

Red states now legalizing recreational marijuana too The 2020 election proved how broadly accepted recreational marijuana has become throughout the US and across party lines, with measures to legalize recreational pot breezing to victories in Arizona, New Jersey, Montana and South Dakota. (Nov. 12) Subscribe for more Breaking News: https://ift.tt/18F6bii Website: https://apnews.com Twitter: https://twitter.com/AP Facebook: https://ift.tt/2Nv6Z1g Google+: https://ift.tt/seidce Instagram: https://ift.tt/2G5Qog8 ​ You can license this story through AP Archive: https://ift.tt/2ImtqJ5

Two virus survivors get double lung transplants

Two virus survivors get double lung transplants A young paralegal and a car mechanic received lifesaving double lung transplants at Northwestern Medicine in Chicago after COVID-19 destroyed their lungs. (July 30) Subscribe for more Breaking News: https://ift.tt/18F6bii Website: https://apnews.com Twitter: https://twitter.com/AP Facebook: https://ift.tt/2Nv6Z1g Google+: https://ift.tt/seidce Instagram: https://ift.tt/2G5Qog8 ​ You can license this story through AP Archive: https://ift.tt/310Ng1O