WORLDTECH NEWS Global technology intelligence.Contact
← Back to WORLDTECH
Chips & Hardware SINGLE SOURCE

Abusing SQL to Play DOOM

Detailed close-up of a green electronic circuit board, highlighting technology components. Shot in Mérida, Venezuela.
Illustrative photo.Photo by Arturo A on Pexels

What happened

To demonstrate its capabilities, and perhaps to show off their skills with SQL, a group at CedarDB ported the original DOOM to this language . While that is certainly what it was designed for, SQL is still a programming language at its core.

The project stores the WAD data (essentially everything except the engine) in a series of tables, which was fairly straightforward compared to the rest of the project. Where it gets more complicated is managing the timing that ties the game to 35 fps, and of course rendering the images.

Their rendering process takes up 1300 lines of SQL across 89 common table expressions (CTEs) which is certainly advanced for this language. The rest of the project is another 4000 lines of SQL, with a bit of Python to handle the keyboard inputs, timing, and display of the generated bitmap.

Sources & evidence