Saturday, 3 October 2026
Rīga TV

World and Latvian news in one place

TechnologyPublished: 3 October 2026 at 02:23

Developer gets Doom running inside an SQL database

Programmer Lukas Vogel built a project called SQLDoom that runs the classic game Doom using SQL database queries for game logic and rendering. The project is a major step up from his earlier, less successful attempt.

Foto: Ars Technica

A developer has published a detailed account of how he got the classic first-person shooter Doom running using nothing but SQL database queries instead of a conventional game engine.

The project, called SQLDoom, uses a small Python client to handle player input and output, manage game timing, and display frames on screen. However, all the actual game logic — both the level geometry and the game state — is stored and processed within tables in a CedarDB database. About 1,300 lines of SQL code, spread across 89 common table expressions, drive the game mechanics and generate 35 bitmap frames per second.

An improvement over the earlier attempt

SQLDoom represents a significant leap forward from the developer's previous project, DoomQL, which was built a year earlier with the goal of creating a multiplayer shooter entirely within SQL. That earlier effort, however, only managed to produce grayscale, raycasting-based ASCII graphics resembling the simple right-angled maps of Wolfenstein 3D rather than Doom itself.

The new SQLDoom version is capable of generating full-color 640×480 pixel frames that resemble output from the original Doom executable.

Turning data into a playable game

According to the developer, converting Doom's classic WAD files into a relational database was relatively straightforward, since the original game already broke levels down into vertices, lines, sectors, and similar elements that map well onto database structures. Even the game's well-known binary space partition trees were successfully translated into SQL, using a sort key pre-computed for each object's position at load time. Thanks to this key, a simple "ORDER BY" statement can determine, for every single frame, which parts of walls should be displayed and which should be skipped, substantially improving performance.

Comments

0/1500

Comments are automatically moderated. No hate, threats, personal data or spam.

Loading comments…

More in this category