Rendering Doom within a database is a bold experiment, though as Ars Technica notes, it is "obviously a bad idea." The SQLDoom project uses a small Python client to manage input, output, and game timing, while Cedar DB tables handle the game geometry and state. Approximately 1,300 lines of SQL queries across 89 common table expressions implement the game logic and generate 35 bitmap framebuffers per second. This represents a major improvement over the previous Doom QL project, which achieved only raycasting-based, grayscale ASCII graphics reminiscent of Wolfenstein 3D.
The newer SQLDoom produces full-color 640x480 frames indistinguishable from the original executable. Converting Doom's classic WAD files to a relational database was straightforward because the original game structured levels into vertices, lines, and sectors. Even the famous binary-space partition trees translate to SQL using a pre-computed sort_key for objects at load time, allowing a simple "ORDER BY" statement to determine visible walls per frame, vastly improving performance.
Fuente: Ars Technica · Resumido por HeadlinesBriefing