Just because you can render a Doom-like in SQL doesn't mean you should

CedarDB pushed to the limit in improbable gaming experiment

The world has moved on from making Doom run on increasingly ridiculous devices. Now it's all about porting it to the most inappropriate of languages. Cue DOOMQL, a version of the shooter written in pure SQL.

The "pure SQL" part is important. There have been attempts to get Doom-like games up and running in the past. The excellent DuckDB-DOOM, for example, appeared earlier this year and used SQL for the game logic (including 3D raycasting and rendering), but the author of DOOMQL, Lukas Vogel, wanted to take things further and do everything in SQL.

Oh, and it had to be multiplayer too. After all, a database server is just like a traditional game server, right? How hard could it be?

To be clear from the outset, implementing a Doom-like game (and rendering it) in something like SQL is unlikely to produce visuals that rival the pixel prowess of the '90s original. In fact, its appearance made this writer nostalgic for 3D Monster Maze on the Sinclair ZX81, although DOOMQL, which Vogel reckons will run at 128 x 64 pixels at 30 frames per second, is a definite step up.

Vogel used CedarDB for database services, but said: "To be honest, the database nerd in me just wanted to turn all knobs up to 11 and see what breaks."

As it transpired, nothing does. It all appears to work splendidly, considering that this is SQL doing all the work (aside from a shell script that runs the file approximately 30 times a second and some Python to handle the inputs). "And multiplayer 'just worked' because the database system, which handles all the nasty concurrency, is the source of truth," Vogel said.

"I set out to see if I could push Patrick's demo [DuckDB-DOOM] to an extreme: doing the entire rendering pipeline in SQL. And while it works, I have to admit that it is a pretty… bad idea? Fast enough, but horrible to maintain and debug."

Vogel was quick to pile kudos on DuckDB-DOOM, and while we'd quibble a little with calling this (and its ilk) "Doom" – they are more "Doom-like" rather than a port of the original – the skill required to make SQL jump through the requisite hoops is undeniable.

If persuading SQL to do the entire rendering pipeline is a "bad idea," we cannot wait for a terrible one. ®

More about

TIP US OFF

Send us news


Other stories you might like