Doom's game logic ported entirely to SQL

Original: We ported the original Doom to SQL

Why This Matters

Demonstrates that modern SQL engines can handle real-time game logic at interactive frame rates.

CedarDB engineer Lukas Vogel ported the original 1993 Doom—game logic and BSP renderer—to SQL queries running inside a database, achieving 35 FPS gameplay and 60 Hz rendering at 320x200 on a laptop.

CedarDB's Lukas Vogel has done what few would attempt: a full port of the original 1993 Doom to SQL. Both the game loop and the renderer run as SQL queries inside CedarDB. Python handles only timing, keyboard input, and drawing the bitmap it receives back—deliberately kept "boringly" thin.

The renderer uses Doom's actual BSP tree traversal rather than raycasting, meaning it supports textured walls, arbitrary wall angles, and varying floor heights. An earlier project, DOOMQL, used raycasting and was criticized for resembling Wolfenstein 3D more than Doom. This version fixes that.

Performance: the game loop targets the original 35 FPS tic rate; the renderer hits up to 60 Hz on an AMD Ryzen 7 7840U. The complete 320x200 framebuffer is computed in SQL each frame.

Multiplayer deathmatch also works—four slots, with a live queue. Because all game state lives in database tables, spectators waiting in the queue can query live match state via SQL. The author notes this is one area where a database architecture genuinely shines: multiplayer "almost comes for free" since shared state is the database's native model.

The shareware first episode is playable now on EU and US servers. Source is available on GitHub.

Source

cedardb.com — Read original →