Recently, a programmer used "pure SQL" to build a multiplayer first-person shooter game similar to "Doom" called DOOMQL.The game is implemented with only about 150 lines of Python code. Although there are limitations in the software architecture, the running effect is surprising, and the frame rate can reach about 30FPS.

DOOMQL was inspired by Patrick Trainer's DuckDB-DOOM project, which also tried to use SQL to build a game similar to "Doom", but used JavaScript for rendering and input processing.

In contrast, DOOMQL implements a true "pure SQL" game, which not only supports multiplayer mode, but also uses SQL to handle rendering and input, with a resolution of up to 128×64 pixels.

Developer Lukas Vogel said that the use of JavaScript in DuckDB-DOOM "feels like cheating" and that his own work is also better in performance, with a frame rate much higher than DuckDB-DOOM's 8FPS.

Vogel, who is also co-founder of database performance company CedarDB, completed development of DOOMQL during a month's parental leave.

The game's architecture is simple and clever: state is stored in database tables, and rendering implements ray casting and sprite projection through SQL views.The game loop is driven by a small shell script that executes the SQL file about 30 times per second, while the client consists of about 150 lines of Python code responsible for input polling and querying the database for the 3D view.

Currently, the code of DOOMQL is open source on GitHub, and players can use Docker and Python to run the game locally. Vogel plans to improve the game in the future, including adding power-ups, a variety of weapons, optimizing the sprite level-of-detail system, improving the client, and adding AI opponents.